summaryrefslogtreecommitdiffstats
path: root/source/rpc_parse
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-09-02 00:24:28 +0000
committerJeremy Allison <jra@samba.org>2005-09-02 00:24:28 +0000
commit77c64b9b6289e4e58279ba24dc4be116e3a44e59 (patch)
treee3d2ce9af125c939251cfac8971bb3b205333c3a /source/rpc_parse
parent1127e5f6e15816211efc3f5eb42f52394be0754f (diff)
downloadsamba-77c64b9b6289e4e58279ba24dc4be116e3a44e59.tar.gz
samba-77c64b9b6289e4e58279ba24dc4be116e3a44e59.tar.xz
samba-77c64b9b6289e4e58279ba24dc4be116e3a44e59.zip
r9935: Make it easier to find overruns.
Jeremy.
Diffstat (limited to 'source/rpc_parse')
-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 {