1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

Fixed crash bug in display_print_info_1()

(This used to be commit d1564fbf1f4950c12516470d4566efeca3ad79e5)
This commit is contained in:
Tim Potter 2002-01-03 02:48:23 +00:00
parent 9164ed6220
commit af8ed15401

View File

@ -184,9 +184,19 @@ static void display_print_info_1(PRINTER_INFO_1 *i1)
fstring name;
fstring comm;
rpcstr_pull(desc, i1->description.buffer, sizeof(desc), 0, STR_TERMINATE);
rpcstr_pull(name, i1->name.buffer, sizeof(name), 0, STR_TERMINATE);
rpcstr_pull(comm, i1->comment.buffer, sizeof(comm), 0, STR_TERMINATE);
desc[0] = name[0] = comm[0] = 0;
if (i1->description.buffer)
rpcstr_pull(desc, i1->description.buffer, sizeof(desc), 0,
STR_TERMINATE);
if (i1->name.buffer)
rpcstr_pull(name, i1->name.buffer, sizeof(name), 0,
STR_TERMINATE);
if (i1->comment.buffer)
rpcstr_pull(comm, i1->comment.buffer, sizeof(comm), 0,
STR_TERMINATE);
printf("\tflags:[0x%x]\n", i1->flags);
printf("\tname:[%s]\n", name);