# gdb /usr/libexec/cups/cgi-bin/printers.cgi /var/dumps/core.printers.cgi.31750 GNU gdb (Gentoo 8.3.1 vanilla) 8.3.1 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/libexec/cups/cgi-bin/printers.cgi... [New LWP 31750] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/libexec/cups/cgi-bin/printers.cgi'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f2546710521 in __strlen_avx2 () from /lib64/libc.so.6 (gdb) where #0 0x00007f2546710521 in __strlen_avx2 () from /lib64/libc.so.6 #1 0x00007f2546630b5f in strdup () from /lib64/libc.so.6 #2 0x0000559e305a0eb5 in cgiGetArray (name=, element=) at var.c:173 #3 0x0000559e3059ff87 in cgi_copy (out=out@entry=0x7f2546771760 <_IO_2_1_stdout_>, in=in@entry=0x559e32217530, element=element@entry=1, term=term@entry=125 '}', indent=indent@entry=4) at template.c:378 #4 0x0000559e3059fec8 in cgi_copy (out=0x7f2546771760 <_IO_2_1_stdout_>, in=0x559e32217530, element=0, term=, indent=2) at template.c:344 #5 0x0000559e305a05d3 in cgi_copy (out=0x7f2546771760 <_IO_2_1_stdout_>, in=in@entry=0x559e32217530, element=element@entry=0, term=term@entry=0 '\000', indent=indent@entry=0) at template.c:598 #6 0x0000559e305a0a31 in cgiCopyTemplateLang (tmpl=0x559e305a21c1 "printers.tmpl") at template.c:144 #7 0x0000559e3059cb19 in show_all_printers (user=, http=0x559e3221aa70) at printers.c:425 #8 main () at printers.c:131 (gdb) bt full #0 0x00007f2546710521 in __strlen_avx2 () from /lib64/libc.so.6 No symbol table info available. #1 0x00007f2546630b5f in strdup () from /lib64/libc.so.6 No symbol table info available. #2 0x0000559e305a0eb5 in cgiGetArray (name=, element=) at var.c:173 var = #3 0x0000559e3059ff87 in cgi_copy (out=out@entry=0x7f2546771760 <_IO_2_1_stdout_>, in=in@entry=0x559e32217530, element=element@entry=1, term=term@entry=125 '}', indent=indent@entry=4) at template.c:378 ch = op = name = "printer_make_and_model\000\000\000\000\000\000\000\000g@\243\224\375\177\000\000r \"Expor\360\350\"2\236U\000\000\020\351\"2\236U\000\000\060\351\"2\236U\000\000P\351\"2\236U\000\000p\351\"2\236U\000\000\220\351\"2\236U\000\000\260\351\"2\236U\000\000\320\351\"2\236U\000\000\360\351\"2\236U\000\000\001\000\000\000\005\000\000\000\000@\000\000\000\000\000\000\000@\000\000\000\000\000\000\000@\000\000\000\000\000\000\ndell_e5580\003a1m\002cz\000\000\000\000\000\000\001\000\000\000\004\000\000\000\000\020\001\000\000\000\000\000\000\020\001\000\000\000\000\000\000\020"... nameptr = innername = "\000\000\000\000\000\000\000\000IwF%\177\000\000a\340{E%\177\000\000\000\004\000\000\000\000\000\000x*\243\224\375\177", '\000' , "\020\002", '\000' , "\004\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\001\000\000\000\001\000\000\000\020&\243\224\375\177\000\000\300cZ0\236U", '\000' , "\375\177\000\000\000\000\000\000\004\000\000\000\377\377\377\377", '\000' , "\304\037\001\000\000\000\000\000\374\003\000\000\000\000\000\000\374\003\000\000\000\000\000\000\004\000\000\000\000\000\000\000Q"... innerptr = s = value = innerval = outptr = outval = "R\345td\004\000\000\000\001\000\000\000\000\000\000\000\020V\001\000\000\000\000\000\020V\001\000\000\000\000\000\000\026\316\003\070\300\324\355\360\t\000\000\000\000\000\000\332,Z0\236U\000\000\260'\243\224\375\177\000\000\320'\243\224\375\177\000\000\327,Z0\236U\000\000P)\243\224\375\177\000\000\000\000\000\000\000\000\000\000\020\236`F%\177\000\000\000\000@\000\000\000\200\000\000\026\316\003\070\300\324킂\020\000\002\005\001\020\234(Z0\236U\000\000\000(\243\224\375\177\000\000\020(\243\224\375\177\000\000\232(Z0\236U\000\000P)\243\224\375\177\000\000`\312vF%\177\000\000\020\236`F%\177\000\000\000\000\000\000@\t\000\000\000\000\000\000\000\000\000\000\001", '\000' ... compare = "0u!2\236U\000\000`\027wF%\177\000\000\317\000\000\000\000\000\000\000@\030wF%\177\000\000㜆F%\177\000\000\001", '\000' , "l_e5580\003\250\246ZF%\177\000\000\020*\243\224\375\177\000\000\032\a\207F%\177", '\000' , "\317\000\000\000\000\000\000\000\060u!2\236U\000\000\004\000\000\000\000\000\000\000?\000\000\000\000\000\000\000؂\254\224\375\177\000\000\320F\210F%\177\000\000\030'\243\224\375\177\000\000\024'\243\224\375\177\000\000\200\037\000\000\377\377\000\000pp\000\000\000\000\000\000\354G\206F%\177\000\000\244\315'"... result = uriencode = 0 re = {buffer = 0x7f2546624b65 <_IO_setb+117>, allocated = 22, used = 17137533828866119168, syntax = 4294967216, fastmap = 0x559e32217530 "\210$\255", , translate = 0x0, re_nsub = 17137533828866119168, can_be_null = 0, regs_allocated = 0, fastmap_accurate = 1, no_sub = 1, not_bol = 0, not_eol = 0, newline_anchor = 0} #4 0x0000559e3059fec8 in cgi_copy (out=0x7f2546771760 <_IO_2_1_stdout_>, in=0x559e32217530, element=0, term=, indent=2) at template.c:344 i = pos = 207 count = 6 ch = op = name = "[printer_name\000\373T\206F%\177\000\000\001", '\000' , "\001", '\000' , "\001\000\000\000\000\000\000\000\060A\210F%\177\000\000(,\243\224\375\177\000\000\000\000\000\000\000\000\000\000\060A\210F%\177\000\000\220\223\177F\001\000\000\000\220D\210F%\177\000\000\000\000\000\000\000\000\000\000h<\243\224\375\177\000\000h8\243\224\375\177\000\000\377\377\377\377\000\000\000\000㜆F%\177\000\000\b\247wF%\177\000\000\000\260\177F%\177\000\000\000\000\000\000\000\000\000\000\020\204ZF%\177\000\000\220/\243\224\375\177\000\000\032\a\207F%\177\000\000\000\000\000\000\000\000\000\000"... nameptr = innername = "@\243\224\375\177\000\000h4\243\224\375\177\000\000㜆F%\177\000\000\001", '\000' , "`.\243\224\375\177\000\000\b\247wF%\177\000\000\060\060\243\224\375\177\000\000\032\a\207F%\177\000\000\000\000\000\000\000\000\000\000\t\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000h@\243\224\375\177\000\000\310H\243\224\375\177\000\000\063\000\000\000\000\000\000\000eD\243\224\375\177\000\000i{nF%\177\000\000\002", '\000' , "\b\000\000\000\000\000\000\000\200\037\000\000\377\377\000\000\000\000", '\377' , "//localhost/prin", '\000' ... innerptr = s = value = innerval = outptr = outval = "6\000EARCH_DEST}\000\000\000 \000\000\000\000\000\000\000\000\000\026\316\003\070\300\324\355\000\000\000\377\377\377\377\377\332,Z0\236U\000\000\300\062\243\224\375\177\000\000\340\062\243\224\375\177\000\000\327,Z0\236U\000\000`4\243\224\375\177\000\000\000\000\000\000\000\000\000\000\020\236`F%\177\000\000@/\000:?/\000a\000\026\316\003\070\300\324\355ZZZZZZZZ\234(Z0\236U\000\000\020\063\243\224\375\177\000\000 3\243\224\375\177\000\000\232(Z0\236U\000\000`4\243\224\375\177\000\000`\312vF%\177\000\000\020\236`F%\177", '\000' ... compare = "1\000asses\000\n6\243\224\375\177\000\000㜆F%\177\000\000\001\000\000\000\000\000\000\000B\235\206F%\177\000\000\000\000\000\000\003\000\000\000heZF%\177\000\000 5\243\224\375\177\000\000\032\a\207F%\177\000\000r\000\000\000\000\000\000\000\024", '\000' , "-\000\000\000\000\000\000\000\n6\243\224\375\177\000\000?\000\000\000\000\000\000\000 \000\000\000\000\000\000\000B@\206\000\302\000\200\300\064\000\000\000\065\000\000\000\000\000\000\000\066\000\000\000\067\000\000\000\070\000\000\000\200\037\000\000\377\377\000\000\000\000\000\000;\000\000\000\000\000\000\000<\000\000\000>\000\000\000?\000\000\000\000\000\000\000A\000\000\000\000\000\000\000"... result = uriencode = re = {buffer = 0x7f2546777d38, allocated = 94137904377644, used = 855349935, syntax = 13364842, fastmap = 0x7ffd94a32ac4 "", translate = 0x1be , re_nsub = 140727097174928, can_be_null = 0, regs_allocated = 0, fastmap_accurate = 0, no_sub = 1, not_bol = 0, not_eol = 1, newline_anchor = 0} #5 0x0000559e305a05d3 in cgi_copy (out=0x7f2546771760 <_IO_2_1_stdout_>, in=in@entry=0x559e32217530, element=element@entry=0, term=term@entry=0 '\000', indent=indent@entry=0) at template.c:598 ch = op = 61 '=' name = "#printer_name\000\000\000\000\000%\177\000\000\350,[F%\177\000\000\220OZF%\177\000\000\337\334wF%\177\000\000\317Mv\323\000\000\000\000\067\331M\003\000\000\000\000\204\066\243\224\375\177\000\000\070\001\000\000%\177\000\000P7\243\224\375\177\000\000H\210wF%\177\000\000@7\243\224\375\177\000\000\250P\373E%\177\000\000\016\000\000\000\000\000\000\000\000\020", '\000' , "\317Mv\323", '\000' , "\337\334wF%\177\000\000`\263\177F%\177\000\000@7\243\224\375\177\000\000P7\243\224\375\177\000\000\373T\206F%\177\000\000\002\000\000\000\000\000\000\000"... nameptr = innername = "R\373E%\177\000\000\000\260\177F%\177\000\000\000\000\000\000\001\000\000\000`\263\177F%\177\000\000\000\000\000\000\000\000\000\000\377\377\377\377\000\000\000\000\360\000\000\000\000\000\000\000\377\377\377\377\000\000\000\000\360\264\177F%\177\000\000\320lZF%\177\000\000\360\264\177F%\177\000\000\000\000\000\000\000\000\000\000[\000\000\000|\000\000\000n\000\000\000w\000\000\000\230\215\000\000\000\000\000\000\230\215\000\000\000\000\000\000`\306~E%\177\000\000\320\070\243\224\375\177\000\000@\231\177F%\177\000\000\004\000\000\000\000\000\000\000\020\242!2\236U\000\000\060u", '\000' , "㜆F%\177\000\000\001", '\000' ... innerptr = s = value = innerval = outptr = outval = "6\000EARCH_DEST}\000}\000\000\026\316\003\070\300\324\355\004\000\000\000\000\000\000\000\023%Z0\236U\000\000\300=\243\224\375\177\000\000\340=\243\224\375\177\000\000\016%Z0\236U\000\000`?\243\224\375\177\000\000`\320vF%\177\000\000\020\236`F%\177", '\000' , "lhost\000\224|", '\000' , "\001", '\000' , "%\177\000\000\377\377\377\377\377\377\377\377", '\000' , "\032\000\000\000%\177\000\000\000\000\000\000\000\000\000\000\301!Z0\236U\000\000\000\000\000\000\000\000\000\000\032\000\000\000%\177\000\000"... compare = "0\000\206F%\177\000\000\001", '\000' , ".\004\000\000\000\000\000\000@\300ZF%\177\000\000\060@\243\224\375\177\000\000\032\a\207F%\177", '\000' , "\240(wF%\177\000\000\000\000\000\000\000\000\000\000\060u!2\236U\000\000\000\000\000\000\000\000\000\000\062\000\000\000\000\000\000\000inoltaC280\000F%\177\000\000\030=\243\224\375\177\000\000\024=\243\224\375\177\000\000\200\037\000\000\377\377\000\000\020\311wF%\177\000\000\354G\206F%\177\000\000\321\376\360\357\000\000\000\000\360\264\177F%\177", '\000' , "\213wF%\177\000\000"... result = uriencode = re = {buffer = 0x1003e0003, allocated = 8704, used = 64, syntax = 39736, fastmap = 0x7f25468647ec "\205\300t\211\351x\377\377\377\017\037", translate = 0x22494966 , re_nsub = 139798073722860, can_be_null = 1, regs_allocated = 3, fastmap_accurate = 1, no_sub = 0, not_bol = 0, not_eol = 1, newline_anchor = 1} #6 0x0000559e305a0a31 in cgiCopyTemplateLang (tmpl=0x559e305a21c1 "printers.tmpl") at template.c:144 filename = "/usr/share/cups/templates/printers.tmpl\000pl\000mpl\000pl\000\316\003\070\300\324\355\220D\243\224\375\177\000\000\002\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000\240\001\000\000\000\000\000\000Њ#2\236U\000\000@D\243\224\375\177\000\000\000\000\000\000\000\000\000\000)\275]F%\177\000\000\030\000\000\000\000\000\000\000I\vZ0\236U\000\000\210B\243\224\375\177\000\000@D\243\224\375\177\000\000\240\212#2\236U\000\000\005", '\000' , "\026\316\003\070\300\324\355p\341\"2\236U\000\000\004\000\000\000\000\000\000\000\005"... locale = "/cs\000UTF8\000\000\000\000\000\000\000" locptr = directory = lang = in = 0x559e32217530 #7 0x0000559e3059cb19 in show_all_printers (user=, http=0x559e3221aa70) at printers.c:425 i = 6 request = response = 0x559e3222edd0 printers = 0x559e32237e70 printer = first = 0 count = 6 var = search = val = "6\000rinters/IT4I_MinoltaC280\000F%\177\000\000\000\000\000\000\000\000\000\000\270\332YF%\177\000\000\220\355XF%\177\000\000\000\000\000\000\000\000\000\000㜆F%\177\000\000\001", '\000' , "\200Z!2\236U\000\000\330[ZF%\177\000\000\000M\243\224\375\177\000\000\032\a\207F%\177\000\000\200\330YF%\177\000\000\200\330YF%\177\000\000 \234FF%\177", '\000' , "\377\000\000\000\000\000\000", '\377' ... #8 main () at printers.c:131 printer = user = http = 0x559e3221aa70 request = response = attr = op = def_attrs = {0x559e305a211a "printer-name", 0x559e305a2134 "printer-uri-supported"} (gdb)