OSDN Git Service

seg fault if input@type is null and @value is not null
authorcoltware@gmail.com <coltware@gmail.com>
Sat, 7 Nov 2009 09:15:04 +0000 (09:15 +0000)
committerAtsushi Konno <atkonn@gmail.com>
Thu, 10 Dec 2009 03:28:38 +0000 (12:28 +0900)
src/chxj_ixhtml10.c

index b0c79d4..910d520 100755 (executable)
@@ -1938,9 +1938,11 @@ s_ixhtml10_start_input_tag(void *pdoc, Node *node)
     W_L("\"");
   }
   if (attr_value) {
-    if (STRCASEEQ('s','S',"submit",attr_type) || STRCASEEQ('r','R',"reset",attr_type)) {
-      apr_size_t value_len = strlen(attr_value);
-      attr_value = chxj_conv_z2h(r, attr_value, &value_len, ixhtml10->entryp);
+    if (attr_type){
+      if (STRCASEEQ('s','S',"submit",attr_type) || STRCASEEQ('r','R',"reset",attr_type)) {
+        apr_size_t value_len = strlen(attr_value);
+        attr_value = chxj_conv_z2h(r, attr_value, &value_len, ixhtml10->entryp);
+      }
     }
 
     W_L(" value=\"");