fuzz-calendarspec: actually run the second part of the fuzzer
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 16 Mar 2019 09:57:12 +0000 (10:57 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 16 Mar 2019 17:13:17 +0000 (18:13 +0100)
https://github.com/systemd/systemd/pull/11975#issuecomment-473467475

src/fuzz/fuzz-calendarspec.c

index 55d8613..8f03150 100644 (file)
@@ -14,7 +14,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
 
         str = memdup_suffix0(data, size);
 
-        if (calendar_spec_from_string(str, &cspec) > 0) {
+        if (calendar_spec_from_string(str, &cspec) >= 0) {
                 (void) calendar_spec_valid(cspec);
                 (void) calendar_spec_normalize(cspec);
                 (void) calendar_spec_to_string(cspec, &p);