summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-09-02 00:24:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:03:28 -0500
commite68872d1473ea0557fac1072055a6ed21e5b3d82 (patch)
treee3d2ce9af125c939251cfac8971bb3b205333c3a /source
parent18d05431831c88f6302a55fe23f51951987f2cb0 (diff)
downloadsamba-e68872d1473ea0557fac1072055a6ed21e5b3d82.tar.gz
samba-e68872d1473ea0557fac1072055a6ed21e5b3d82.tar.xz
samba-e68872d1473ea0557fac1072055a6ed21e5b3d82.zip
r9935: Make it easier to find overruns.
Jeremy.
Diffstat (limited to 'source')
-rw-r--r--source/rpc_parse/parse_prs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/rpc_parse/parse_prs.c b/source/rpc_parse/parse_prs.c
index 493536eb2a2..709a5d39af6 100644
--- a/source/rpc_parse/parse_prs.c
+++ b/source/rpc_parse/parse_prs.c
@@ -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 {