1
0
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:
Werner Koch 2001-12-15 16:19:08 +00:00
parent 1301c0b5ef
commit f82bdf6e94
2 changed files with 7 additions and 3 deletions

View File

@ -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.

View File

@ -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);
}