Browse code

bug_fix: no checking of char * (bug discovery courtesy of Andrei)

Jiri Kuthan authored on 28/11/2002 00:51:41
Showing 1 changed files
... ...
@@ -817,14 +817,14 @@ int branch_builder( unsigned int hash_index,
817 817
 		begin++; size--;
818 818
 	} else return 0;
819 819
 
820
-	/* label is set -- use it ... */
821
-	if (label) {
822
-		if (int2reverse_hex( &begin, &size, label )==-1)
823
-			return 0;
824
-	} else { /* ... no label -- char value is used */
820
+	/* string with request's characteristic value ... use it ... */
821
+	if (char_v) {
825 822
 		if (memcpy(begin,char_v,MD5_LEN)) {
826 823
 			begin+=MD5_LEN; size-=MD5_LEN;
827 824
 		} else return 0;
825
+	} else { /* ... use the "label" value otherwise */
826
+		if (int2reverse_hex( &begin, &size, label )==-1)
827
+			return 0;
828 828
 	}
829 829
 
830 830
 	if (size) {