pcb

Potential memory overrun bug due to fixed length string in ImportGUI()

Bug #1069317 reported by Peter Clifton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
New
Undecided
Unassigned

Bug Description

commit 1574518c1e76b195bf498b7136de58d416a55654

hid/gtk: ImportGUI() can select multiple files

..with one small modification to the original patch by Felix Ruoff

Closes-bug: lp-934616

This patch should not have used:

 + gchar sname[128];

and then written into this string without at least some length checking.

Ideally there would be no artificially imposed limit upon this string length.

Revision history for this message
DJ Delorie (djdelorie) wrote :

The only thing written to this buffer (at the moment) is a fixed string with an integer appended. Until we get to 384-bit integers, we won't overrun that buffer. Confirm?

Traumflug (mah-jump-ing)
Changed in geda-project:
importance: Undecided → Critical
Revision history for this message
Traumflug (mah-jump-ing) wrote :

I agree with both of you. It's unlikely the string will ever overflow, still it's a good general practice to use the length-checking version of sprintf(), snprintf().

Made a commit and put it directly onto master:
http://git.geda-project.org/pcb/commit/

Changed in geda-project:
status: New → Fix Committed
Revision history for this message
Traumflug (mah-jump-ing) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.