diff options
author | Gerald Carter <jerry@samba.org> | 2000-12-21 23:38:47 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2000-12-21 23:38:47 +0000 |
commit | b0a219686bfd1a247311ed3b32d1a4b393a8de98 (patch) | |
tree | ff2b38d565ad0be7e93a6988efa3184fb79bd84e /source3/printing | |
parent | 1459f1022c8a1b7be6d0e148ebe1a6bef2941b50 (diff) | |
download | samba-b0a219686bfd1a247311ed3b32d1a4b393a8de98.tar.gz samba-b0a219686bfd1a247311ed3b32d1a4b393a8de98.tar.bz2 samba-b0a219686bfd1a247311ed3b32d1a4b393a8de98.zip |
merge from appliance head
(This used to be commit 393c5f14e0858dcb3d6cb26eb5643b520c2c9686)
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/nt_printing.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index c7781c6510..91679235cd 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2067,6 +2067,11 @@ static int unpack_devicemode(NT_DEVICEMODE **nt_devmode, char *buf, int buflen) */ len += tdb_unpack(buf+len, buflen-len, "B", &extra_len, &devmode.private); devmode.driverextra=(uint16)extra_len; + + /* check to catch an invalid TDB entry so we don't segfault */ + if (devmode.driverextra == 0) { + devmode.private = NULL; + } } *nt_devmode = (NT_DEVICEMODE *)memdup(&devmode, sizeof(devmode)); |