]> granicus.if.org Git - php/commitdiff
- handled possible case that an Anchor has no Position
authorUwe Steinmann <steinm@php.net>
Thu, 14 Dec 2000 07:37:37 +0000 (07:37 +0000)
committerUwe Steinmann <steinm@php.net>
Thu, 14 Dec 2000 07:37:37 +0000 (07:37 +0000)
  (This used to cause a segm fault)

ext/hyperwave/hg_comm.c

index b65bd8f34b179956276cddeb04373b1b0b5880ca..5682025c5b3f02213245511069a5a64e4d6d30d8 100644 (file)
@@ -375,7 +375,7 @@ DLIST *fnCreateAnchorList(hw_objectID objID, char **anchors, char **docofanchorr
                           In such a case the Position has the value 'invisible' */
                        str = strstr(object, "Position");
                        str += 9;
-                       if(0 != strncmp(str, "invisible", 9)) {
+                       if((str != 9) && (0 != strncmp(str, "invisible", 9))) {
                                sscanf(str, "0x%X 0x%X", &start, &end);
                
                                /* Determine ObjectID */