1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r9935: Make it easier to find overruns.

Jeremy.
(This used to be commit e68872d147)
This commit is contained in:
Jeremy Allison 2005-09-02 00:24:28 +00:00 committed by Gerald (Jerry) Carter
parent 4fa0ed6349
commit adfd5cddf7

View File

@ -529,8 +529,10 @@ char *prs_mem_get(prs_struct *ps, uint32 extra_size)
* If reading, ensure that we can read the requested size item.
*/
if (ps->data_offset + extra_size > ps->buffer_size) {
DEBUG(0,("prs_mem_get: reading data of size %u would overrun buffer.\n",
(unsigned int)extra_size ));
DEBUG(0,("prs_mem_get: reading data of size %u would overrun "
"buffer by %u bytes.\n",
(unsigned int)extra_size,
(unsigned int)(ps->data_offset + extra_size - ps->buffer_size) ));
return NULL;
}
} else {