Hello community,

here is the log from the commit of package ohcount for openSUSE:Leap:15.2 
checked in at 2020-03-27 16:48:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/ohcount (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.ohcount.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ohcount"

Fri Mar 27 16:48:33 2020 rev:2 rq:788940 version:4.0.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/ohcount/ohcount.changes        2020-02-11 
23:26:37.309307430 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.ohcount.new.3160/ohcount.changes      
2020-03-27 16:48:37.163950782 +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.1fbe3P/_old  2020-03-27 16:48:37.535951001 +0100
+++ /var/tmp/diff_new_pack.1fbe3P/_new  2020-03-27 16:48:37.535951001 +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++;

Reply via email to