qt: Fix an rfc2253 parser flaw
* lang/qt/src/dn.cpp (parse_dn_part): Fix parser. -- This could in theory result in reading bytes after a after Nul in a string and thus possible segv on unallocated memory or reading other parts of the memory. However, it is harmless because the rfc2253 strings have been received from GnuPG which is expected to emit correct syntax. GnuPG-bug-id: 5037
This commit is contained in:
parent
f66f856c89
commit
b088d81cef
@ -177,9 +177,8 @@ parse_dn_part(DnPair *array, const unsigned char *string)
|
||||
if (*string == '#') {
|
||||
/* hexstring */
|
||||
string++;
|
||||
for (s = string; hexdigitp(s); s++) {
|
||||
s++;
|
||||
}
|
||||
for (s = string; hexdigitp(s); s++)
|
||||
;
|
||||
n = s - string;
|
||||
if (!n || (n & 1)) {
|
||||
return NULL; /* empty or odd number of digits */
|
||||
|
Loading…
Reference in New Issue
Block a user