summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
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
commitadfd5cddf7577ce0db2d46351d02a440db63e4ec (patch)
tree9fa60cd2c86263d505a2c75c93c622bcaa9bf81a /source3/rpc_parse
parent4fa0ed634930aff67ae4097af20aac9241260839 (diff)
downloadsamba-adfd5cddf7577ce0db2d46351d02a440db63e4ec.tar.gz
samba-adfd5cddf7577ce0db2d46351d02a440db63e4ec.tar.bz2
samba-adfd5cddf7577ce0db2d46351d02a440db63e4ec.zip
r9935: Make it easier to find overruns.
Jeremy. (This used to be commit e68872d1473ea0557fac1072055a6ed21e5b3d82)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_prs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 493536eb2a..709a5d39af 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/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 {