git.samba.org
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
r13915: Fixed a very interesting class of realloc() bugs found by Coverity.
[samba.git]
/
source
/
libsmb
/
spnego.c
diff --git
a/source/libsmb/spnego.c
b/source/libsmb/spnego.c
index f6a66200bacdc6918dca9fcefa2b9b7cfeb4c7c8..a2839578aefc7257a6bd2e242bec32e9e885acd2 100644
(file)
--- a/
source/libsmb/spnego.c
+++ b/
source/libsmb/spnego.c
@@
-48,6
+48,10
@@
static BOOL read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
char *p_oid = NULL;
token->mechTypes =
SMB_REALLOC_ARRAY(token->mechTypes, const char *, i + 2);
+ if (!token->mechTypes) {
+ asn1->has_error = True;
+ return False;
+ }
asn1_read_OID(asn1, &p_oid);
token->mechTypes[i] = p_oid;
}