The Samba-Bugzilla – Attachment 6464 Details for
Bug 8157
std_pcap_cache_reload() fails to parse a cups printcap file correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 3.5.next
0001-Fix-bug-8157-std_pcap_cache_reload-fails-to-parse-a-.patch (text/plain), 1.44 KB, created by
Jeremy Allison
on 2011-05-20 19:39:55 UTC
(
hide
)
Description:
git-am fix for 3.5.next
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2011-05-20 19:39:55 UTC
Size:
1.44 KB
patch
obsolete
>From d31174e0fe327b140976ac930b33d646d5b11041 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 20 May 2011 12:36:56 -0700 >Subject: [PATCH] Fix bug #8157 - std_pcap_cache_reload() fails to parse a cups printcap file correctly. > >The parsing code made some strange assumptions about what is a printer >name, and what is a comment. >--- > source3/printing/pcap.c | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c >index a6bf52a..32f7d9f 100644 >--- a/source3/printing/pcap.c >+++ b/source3/printing/pcap.c >@@ -203,6 +203,10 @@ void pcap_cache_reload(void) > > has_punctuation = (strchr_m(p, ' ') || > strchr_m(p, '\t') || >+ strchr_m(p, '"') || >+ strchr_m(p, '\'') || >+ strchr_m(p, ';') || >+ strchr_m(p, ',') || > strchr_m(p, '(') || > strchr_m(p, ')')); > >@@ -211,8 +215,7 @@ void pcap_cache_reload(void) > continue; > } > >- if (strlen(p) <= MAXPRINTERLEN && >- strlen(p) > strlen(name) && !has_punctuation) { >+ if (strlen(p) <= MAXPRINTERLEN && *name == '\0' && !has_punctuation) { > if (!*comment) { > strlcpy(comment, name, sizeof(comment)); > } >@@ -227,9 +230,6 @@ void pcap_cache_reload(void) > } > } > >- comment[60] = 0; >- name[MAXPRINTERLEN] = 0; >- > if (*name && !pcap_cache_add(name, comment)) { > x_fclose(pcap_file); > goto done; >-- >1.7.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
gd
:
review+
Actions:
View
Attachments on
bug 8157
: 6464 |
6465