Hello community, here is the log from the commit of package ohcount for openSUSE:Factory checked in at 2020-03-26 23:37:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ohcount (Old) and /work/SRC/openSUSE:Factory/.ohcount.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ohcount" Thu Mar 26 23:37:59 2020 rev:2 rq:788668 version:4.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ohcount/ohcount.changes 2019-09-13 14:57:22.585274841 +0200 +++ /work/SRC/openSUSE:Factory/.ohcount.new.3160/ohcount.changes 2020-03-26 23:38:02.894878471 +0100 @@ -1,0 +2,5 @@ +Thu Mar 26 18:31:45 UTC 2020 - Erico Mendonca <[email protected]> + +- test_null_pointer.patch: adding extra checks for NULL pointers to avoid segmentation faults. + +------------------------------------------------------------------- New: ---- test_null_pointer.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ohcount.spec ++++++ --- /var/tmp/diff_new_pack.bPrc7w/_old 2020-03-26 23:38:04.838879173 +0100 +++ /var/tmp/diff_new_pack.bPrc7w/_new 2020-03-26 23:38:04.842879174 +0100 @@ -27,6 +27,7 @@ #Git-Clone: git://github.com/blackducksw/ohcount Source: https://github.com/blackducksoftware/ohcount/archive/%version.tar.gz +Patch0: test_null_pointer.patch Patch1: cflags.diff BuildRequires: bash BuildRequires: file-devel ++++++ test_null_pointer.patch ++++++ --- ohcount-4.0.0-orig/src/sourcefile.c 2019-02-26 17:39:28.000000000 -0300 +++ ohcount-4.0.0/src/sourcefile.c 2020-03-26 14:34:32.334582616 -0300 @@ -178,11 +178,11 @@ lang = iter->pl; } - if (strcmp(entity, "lcode") == 0) { + if ( (p != NULL) && (strcmp(entity, "lcode") == 0) ) { while (*p == ' ' || *p == '\t') p++; ohcount_parsed_language_add_code(lang, p, pe - p); } else if (strcmp(entity, "lcomment") == 0) { - while (*p == ' ' || *p == '\t') p++; + while ( (p != NULL) && (*p == ' ' || *p == '\t')) p++; ohcount_parsed_language_add_comment(lang, p, pe - p); } else if (strcmp(entity, "lblank") == 0) { lang->blanks_count++;
