Browse Source

-fsanitize=address found a bug in my flat_map. *blush*

afl-fuzzing
Roker 3 years ago
parent
commit
9faed09379
2 changed files with 7 additions and 3 deletions
  1. +6
    -1
      src/Makefile
  2. +1
    -2
      src/to_utf8.cc

+ 6
- 1
src/Makefile View File

@ -1,6 +1,11 @@
.PHONY: all clear
CXX=c++ -Wall -O0 -std=c++14 -g -glldb -fstack-protector-all
#CXX=c++ -Wall -O0 -std=c++14 -g -glldb -fstack-protector-all
# for AFL fuzzingtests:
CXX=afl-clang++ -Wall -O0 -std=c++14 -g -glldb \
-fstack-protector-all -fsanitize=address \
-fno-omit-frame-pointer -fno-optimize-sibling-calls
# !FIXME!
GTEST_DIR=$(HOME)/code/googletest/


+ 1
- 2
src/to_utf8.cc View File

@ -30,8 +30,7 @@ namespace
return x;
const Enc* f = std::lower_bound(b, e, x);
return (f->from == x) ? f->to : x;
return (f == e || f->from != x) ? x : f->to;
}
const uint32_t min_element;


Loading…
Cancel
Save