Re: [patch 2/2] track and print last unloaded module in the oops trace



On Jan 7, 2008 12:19 AM, Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
[...]
This patch tracks the last unloaded module, and prints this as part of the
module list in the oops trace.

[...]
}
+ /* Store the name of the last unloaded module for diagnostic purposes */
+ sprintf(last_unloaded_module, mod->name);
free_module(mod);


Why use sprintf? If a module name contains the % character we could
overflow the buffer. Or is module-unloading root-only and we don't
care?

Best regards,
dm.n9107
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [PATCH] uclinux: fix gzip header parsing in binfmt_flat.c
    ... incremented when terminating '\0' character is reached. ... The check of the buffer ... overflow (after an "extra-field" length was taken into account) is also fixed. ...
    (Linux-Kernel)
  • Re: _stprintf
    ... It won't overflow the buffer, ... StringCchPrintf will format the string, which is one character plus a terminal null ...
    (microsoft.public.vc.mfc)
  • Re: setuid, then execvp gets wrong user!
    ... Commenting on just this one line: Never use sprintf. ... Use snprintf instead. ... (This rules applies to all other functions that can overflow a buffer.) ...
    (comp.unix.programmer)
  • renee.rtf.xaa
    ... renee is RTF parser/macro processor I wrote. ... Character Stream\ ... Write Output Buffer to Files\ ...
    (comp.lang.tcl)
  • Re: input & output in assembly
    ... [As you've not specified OS or assembler, ... using individual character I/O and handling the rest yourself in your ... it finds in that string, ... ENTER key is pressed (maximum buffer size: ...
    (comp.lang.asm.x86)

Loading