Try to be more correct and don't fall off the end. Pointed out by
Kevin Coffman. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20372 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -145,10 +145,9 @@ der_get_general_string (const unsigned char *p, size_t len,
|
||||
* an strings in the NEED_PREAUTH case that includes a
|
||||
* trailing NUL.
|
||||
*/
|
||||
len = p1 - p;
|
||||
while (*p1 == '\0' && p1 - p < len)
|
||||
while (p1 - p < len && *p1 == '\0')
|
||||
p1++;
|
||||
if (p1 - p != len + 1)
|
||||
if (p1 - p != len)
|
||||
return ASN1_BAD_CHARACTER;
|
||||
}
|
||||
if (len > len + 1)
|
||||
|
Reference in New Issue
Block a user