From: <svn...@op...> - 2009-09-27 14:36:27
|
Author: paule Date: Sun Sep 27 16:36:12 2009 New Revision: 5856 URL: http://www.opensync.org/changeset/5856 Log: opie-sync: apply patch from ticket #996 to fix potential segfault in contact format conversion code. Patch courtesy of Daniel Gollub. Modified: plugins/opie-sync/src/opie_format.c Modified: plugins/opie-sync/src/opie_format.c ============================================================================== --- plugins/opie-sync/src/opie_format.c Sun Sep 27 07:49:22 2009 (r5855) +++ plugins/opie-sync/src/opie_format.c Sun Sep 27 16:36:12 2009 (r5856) @@ -385,9 +385,9 @@ } } const char *telloc = osync_xmlfield_get_attr(in_xmlfield, "Location"); - if ( !strcmp( telloc, "Home" ) ) + if ( telloc && !strcmp( telloc, "Home" ) ) type |= PT_HOME; - else if ( !strcmp( telloc, "Work") ) + else if ( telloc && !strcmp( telloc, "Work") ) type |= PT_WORK; const char *number = osync_xmlfield_get_key_value(in_xmlfield, "Content"); |