svn commit: samba r14023 - in branches/SAMBA_3_0/source/printing: .
jra at samba.org
jra at samba.org
Wed Mar 8 06:42:40 GMT 2006
Author: jra
Date: 2006-03-08 06:42:39 +0000 (Wed, 08 Mar 2006)
New Revision: 14023
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14023
Log:
My last bug fix still left a potential null deref.
C- "must try harder" :-).
Jeremy.
Modified:
branches/SAMBA_3_0/source/printing/print_generic.c
Changeset:
Modified: branches/SAMBA_3_0/source/printing/print_generic.c
===================================================================
--- branches/SAMBA_3_0/source/printing/print_generic.c 2006-03-08 06:39:33 UTC (rev 14022)
+++ branches/SAMBA_3_0/source/printing/print_generic.c 2006-03-08 06:42:39 UTC (rev 14023)
@@ -200,16 +200,17 @@
*q = NULL;
return 0;
}
+ memset(queue, '\0', sizeof(print_queue_struct)*(numlines+1));
+
+ for (i=0; i<numlines; i++) {
+ /* parse the line */
+ if (parse_lpq_entry(printing_type,qlines[i],
+ &queue[qcount],status,qcount==0)) {
+ qcount++;
+ }
+ }
}
- memset(queue, '\0', sizeof(print_queue_struct)*(numlines+1));
- for (i=0; i<numlines; i++) {
- /* parse the line */
- if (parse_lpq_entry(printing_type,qlines[i],
- &queue[qcount],status,qcount==0)) {
- qcount++;
- }
- }
file_lines_free(qlines);
*q = queue;
return qcount;
More information about the samba-cvs
mailing list