public inbox for bzip2-devel@sourceware.org
 help / color / mirror / Atom feed
* [Bug bzip2/29280] New: Replace sprintf with safer snprintf
@ 2022-06-23 15:42 sean@rogue-research.com
  2022-10-25 22:59 ` [Bug bzip2/29280] " sean@rogue-research.com
  0 siblings, 1 reply; 2+ messages in thread
From: sean@rogue-research.com @ 2022-06-23 15:42 UTC (permalink / raw)
  To: bzip2-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=29280

            Bug ID: 29280
           Summary: Replace sprintf with safer snprintf
           Product: bzip2
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bzip2
          Assignee: nobody at sourceware dot org
          Reporter: sean@rogue-research.com
                CC: bzip2-devel at sourceware dot org
  Target Milestone: ---

bzip2 has one call to sprintf in git master.

sprintf is dangerous because it's easy to overrun the buffer.  Building on
OpenBSD and macOS produce compiler warnings upon any use of the function.

Would be nice to change this one use to snprintf, which takes the buffer size.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug bzip2/29280] Replace sprintf with safer snprintf
  2022-06-23 15:42 [Bug bzip2/29280] New: Replace sprintf with safer snprintf sean@rogue-research.com
@ 2022-10-25 22:59 ` sean@rogue-research.com
  0 siblings, 0 replies; 2+ messages in thread
From: sean@rogue-research.com @ 2022-10-25 22:59 UTC (permalink / raw)
  To: bzip2-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=29280

--- Comment #1 from Sean McBride <sean@rogue-research.com> ---
Created attachment 14412
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14412&action=edit
Patch to replace sprintf with snprintf

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-25 22:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 15:42 [Bug bzip2/29280] New: Replace sprintf with safer snprintf sean@rogue-research.com
2022-10-25 22:59 ` [Bug bzip2/29280] " sean@rogue-research.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).