[PATCH] libcmpiutil, fix potential debug print crash

It seems libcmpiutil still uses HG, sorry I forgot how to send patch with HG, so paste the patch directly here and attach the patch generated from "hg export" as attachement. exporting patch: # HG changeset patch # User Wenchao Xia <xiawenc@linux.vnet.ibm.com> # Date 1351243349 -28800 # Node ID 67a7b959ed47188efb8eb2f462bc7fc9ee145041 # Parent 2984ede9c082bab48b3494ef4b9f5561fadef2ad fix potential crash bug diff -r 2984ede9c082 -r 67a7b959ed47 std_indication.c --- a/std_indication.c Tue May 24 10:45:46 2011 -0400 +++ b/std_indication.c Fri Oct 26 17:22:29 2012 +0800 @@ -141,7 +141,12 @@ enabled = is_ind_enabled(ctx, ind_name, &s); if (s.rc != CMPI_RC_OK) { - CU_DEBUG("Problem checking enabled: '%s'", CMGetCharPtr(s.msg)); + if (s.msg != NULL) { + CU_DEBUG("Problem checking enabled: '%s'", + CMGetCharPtr(s.msg)); + } else { + CU_DEBUG("Problem checking enabled, msg is NULL"); + } goto out; } @@ -176,7 +181,12 @@ enabled = is_ind_enabled(args->_ctx, ind_name, &s); if (s.rc != CMPI_RC_OK) { - CU_DEBUG("Problem checking enabled: '%s'", CMGetCharPtr(s.msg)); + if (s.msg != NULL) { + CU_DEBUG("Problem checking enabled: '%s'", + CMGetCharPtr(s.msg)); + } else { + CU_DEBUG("Problem checking enabled, msg is NULL"); + } goto out; }

On Fri, Oct 26, 2012 at 08:30:22PM +0800, xiaxia347work wrote:
It seems libcmpiutil still uses HG, sorry I forgot how to send patch with HG, so
Hum, no, it's converted to git too: http://libvirt.org/git/?p=libcmpiutil.git;a=summary Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/

Thank u for the tip, thus I will send them with git on Monday next week. Best Regards Wenchao Xia On Fri, Oct 26, 2012 at 08:30:22PM +0800, xiaxia347work wrote:
It seems libcmpiutil still uses HG, sorry I forgot how to send patch with HG, so
Hum, no, it's converted to git too: http://libvirt.org/git/?p=libcmpiutil.git;a=summary Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel Veillard
-
xiaxia347work