sufficient buffer space.
ticket: 2166
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16040
dc483132-0cff-0310-8789-
dd5450dbe970
+2004-02-08 Ken Raeburn <raeburn@mit.edu>
+
+ * util_ordering.c (g_queue_externalize, g_queue_internalize):
+ Check for sufficient buffer space.
+
2003-12-19 Ken Raeburn <raeburn@mit.edu>
* gssapi_generic.c (const_oids): Renamed from oids, and now const.
gss_uint32
g_queue_externalize(void *vqueue, unsigned char **buf, size_t *lenremain)
{
+ if (*lenremain < sizeof(queue))
+ return ENOMEM;
memcpy(*buf, vqueue, sizeof(queue));
*buf += sizeof(queue);
*lenremain -= sizeof(queue);
{
void *q;
+ if (*lenremain < sizeof(queue))
+ return EINVAL;
if ((q = malloc(sizeof(queue))) == 0)
return ENOMEM;
memcpy(q, *buf, sizeof(queue));