Skip to content

fix: prevent overflow in minmea_scan 's' format specifier#98

Open
dwilliams27 wants to merge 1 commit into
kosma:masterfrom
dwilliams27:master
Open

fix: prevent overflow in minmea_scan 's' format specifier#98
dwilliams27 wants to merge 1 commit into
kosma:masterfrom
dwilliams27:master

Conversation

@dwilliams27
Copy link
Copy Markdown

Need to add length check in minmea_scan format specifier, otherwise could have buffer overflow

@hraftery
Copy link
Copy Markdown
Contributor

Just a outsider comment - what makes MINMEA_MAX_SENTENCE_LENGTH special? I agree there's potential overflow, but I would have thought sentence is more likely to be at least that size, than buf. In other words, what's the chances this prevents buf being overflowed, given we don't know how big it is?

Or maybe the better question is, how is minmea_scan used with the s format option? I must admit I don't actually know.

Isn't this just as likely to overflow as strcpy() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants