summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2000-04-05 17:53:45 +0000
committerJean-François Micouleau <jfm@samba.org>2000-04-05 17:53:45 +0000
commit974cf7d7c9d82a85a5006f3b688198ae02f91e90 (patch)
treea5d5bf5af753dc8d9b195121036d6d99c0234f4c /source3/rpc_parse
parentdc2d1544b3718dce5b3d7d91989b3cc5abfdef6b (diff)
downloadsamba-974cf7d7c9d82a85a5006f3b688198ae02f91e90.tar.gz
samba-974cf7d7c9d82a85a5006f3b688198ae02f91e90.tar.bz2
samba-974cf7d7c9d82a85a5006f3b688198ae02f91e90.zip
off by one error ...
J.F. (This used to be commit cef44398f90f670358f2ad430056371d394c7f91)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_spoolss.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 18e736e9af..fd053dbf45 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -2305,8 +2305,11 @@ uint32 spoolss_size_printer_driver_info_3(DRIVER_INFO_3 *info)
for (i=0; (string[i]!=0x0000) || (string[i+1]!=0x0000); i++);
- size+=2*i;
- size+=6;
+ i=i+2; /* to count all chars including the leading zero */
+ i=2*i; /* because we need the value in bytes */
+ i=i+4; /* the offset pointer size */
+
+ size+=i;
return size;
}