diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/smb.h | 3 | ||||
-rw-r--r-- | source3/printing/pcap.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 0acc5cbfa3..f0cdf9f356 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -24,6 +24,9 @@ #ifndef _SMB_H #define _SMB_H +/* Yves Gaige <yvesg@hptnodur.grenoble.hp.com> requested this */ +#define MAXPRINTERLEN 15 + #define BUFFER_SIZE (0xFFFF) #define SAFETY_MARGIN 1024 diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c index 3698114a2f..38c4dec3fc 100644 --- a/source3/printing/pcap.c +++ b/source3/printing/pcap.c @@ -375,7 +375,7 @@ void pcap_printer_fn(void (*fn)()) continue; } - if (strlen(p) <= 8 && strlen(p)>strlen(name) && !has_punctuation) + if (strlen(p) <= MAXPRINTERLEN && strlen(p)>strlen(name) && !has_punctuation) { if (!*comment) pstrcpy(comment,name); pstrcpy(name,p); @@ -391,7 +391,7 @@ void pcap_printer_fn(void (*fn)()) } comment[60] = 0; - name[8] = 0; + name[MAXPRINTERLEN] = 0; if (*name) fn(name,comment); |