]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
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 55d86134948660e67f573b50dbde16d146c8ed04..8f031503e9534b1837f64bc3e31e423d8d1af1fe 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);