0014-ubsan-empty-string-fix.diff 447 B

12345678910111213
  1. diff --git a/gcc/ubsan.c b/gcc/ubsan.c
  2. index 56637d8..1093824 100644
  3. --- a/gcc/ubsan.c
  4. +++ b/gcc/ubsan.c
  5. @@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc)
  6. expanded_location xloc = expand_location (loc);
  7. if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0
  8. - || xloc.file == '\0' || xloc.file[0] == '\xff'
  9. + || xloc.file[0] == '\0' || xloc.file[0] == '\xff'
  10. || xloc.file[1] == '\xff')
  11. return false;