stcorp / coda

The Common Data Access toolset
http://stcorp.github.io/coda/doc/html/index.html
BSD 3-Clause "New" or "Revised" License
37 stars 17 forks source link

coda_expression_fuzzer: Direct-leak in coda_expression_new #68

Closed schwehr closed 4 years ago

schwehr commented 4 years ago
==1257965==ERROR: LeakSanitizer: detected memory leaks
  |  
  | Direct leak of 56 byte(s) in 1 object(s) allocated from:
  | #1 0x55c0fcd69456 in coda_expression_new third_party/stcorp_coda/libcoda/coda-expr.c:392:12
  | #2 0x55c0fcdab728 in coda_expression_parse libcoda/coda-expr-parser.y:990:28
  | #3 0x55c0fcdb06e3 in coda_expression_from_string libcoda/coda-expr-parser.y:1064:9
  | #4 0x55c0fcd08cb9 in LLVMFuzzerTestOneInput third_party/stcorp_coda/fuzz/coda_expression_fuzzer.cc:23:3

Test case:

less testcase-5159939450601472
/j/ESC

expr_goto_field and expr_goto_root

testcase-5159939450601472.zip

svniemeijer commented 4 years ago

Fixed in 26499d36cb3bcd277528111108b86e6e6fac8225

schwehr commented 4 years ago

Verified