Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/test/ossshell.c # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / test / ossshell.c` 100 lines ยท 2692 bytes Raw Blame History 1 /* 2 ** This is a test interface for the ossfuzz.c module. The ossfuzz.c module 3 ** is an adaptor for OSS-FUZZ. (https://github.com/google/oss-fuzz) 4 ** 5 ** This program links against ossfuzz.c. It reads files named on the 6 ** command line and passes them one by one into ossfuzz.c. 7 */ 8 #include 9 #if !defined(_MSC_VER) 10 # include 11 #endif 12 #include 13 #include 14 #include 15 #include "sqlite3.h" 16 17 #if defined(_MSC_VER) 18 typedef unsigned char uint8_t; 19 #endif 20 21 /* 22 ** The entry point in ossfuzz.c that this routine will be calling 23 */ 24 int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); 25 26 /* Must match equivalent #defines in ossfuzz.c */ 27 #define FUZZ_SQL_TRACE 0x0001 /* Set an sqlite3_trace() callback */ 28 #define FUZZ_SHOW_MAX_DELAY 0x0002 /* Show maximum progress callback delay */ 29 #define FUZZ_SHOW_ERRORS 0x0004 /* Show SQL errors */ 30 extern void ossfuzz_set_debug_flags(unsigned); 31 32 33 34 /* 35 ** Read files named on the command-line and invoke the fuzzer for 36 ** each one. 37 */ 38 int main(int argc, char **argv){ 39 FILE *in; 40 int i; 41 int nErr = 0; 42 uint8_t *zBuf = 0; 43 size_t sz; 44 unsigned mDebug = 0; 45 46 for(i=1; i