svn commit: samba r9934 - in trunk/source/rpc_parse: .

jra at samba.org jra at samba.org
Fri Sep 2 00:23:58 GMT 2005


Author: jra
Date: 2005-09-02 00:23:57 +0000 (Fri, 02 Sep 2005)
New Revision: 9934

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9934

Log:
Make it easier to find overruns.
Jeremy.

Modified:
   trunk/source/rpc_parse/parse_prs.c


Changeset:
Modified: trunk/source/rpc_parse/parse_prs.c
===================================================================
--- trunk/source/rpc_parse/parse_prs.c	2005-09-01 23:50:33 UTC (rev 9933)
+++ trunk/source/rpc_parse/parse_prs.c	2005-09-02 00:23:57 UTC (rev 9934)
@@ -529,8 +529,10 @@
 		 * 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 {



More information about the samba-cvs mailing list