mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* keybox-search.c (blob_cmp_name): There is no terminating 0 stored
for the uid; fixed length compare.
This commit is contained in:
parent
1301c0b5ef
commit
f82bdf6e94
@ -1,3 +1,8 @@
|
||||
2001-12-15 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* keybox-search.c (blob_cmp_name): There is no terminating 0 stored
|
||||
for the uid; fixed length compare.
|
||||
|
||||
2001-12-14 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* keybox-blob.c (x509_email_kludge): New.
|
||||
|
@ -170,9 +170,8 @@ blob_cmp_name (KEYBOXBLOB blob, int idx, const char *name, size_t namelen)
|
||||
len = get32 (buffer+pos+4);
|
||||
if (off+len > length)
|
||||
return 0; /* out of bounds */
|
||||
if (len < 2)
|
||||
return 0; /* empty name or 0 not stored */
|
||||
len--;
|
||||
if (len < 1)
|
||||
return 0; /* empty name */
|
||||
|
||||
return len == namelen && !memcmp (buffer+off, name, len);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user