-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
device.c : remove strcpy & sprintf, and move to safe functions
We used strcpy & sprintf in a few places, which opens up classic buffer overflow issues, as described in: https://cwe.mitre.org/data/definitions/120.html This adds the recent length checking, to make sure as the buffer descreases in size, it is managed properly. If we ever think we run out of space, we will no longer buffer overflow. Tested on Pluto and M2k to see if this introduces issues, and couldn't find anything. Signed-off-by: Robin Getz <[email protected]>
- Loading branch information
Showing
1 changed file
with
37 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters