Skip to content

Replace sprintf with snprintf in refclock_ripencc logging#26

Open
kodareef5 wants to merge 1 commit intontp-project:stablefrom
kodareef5:fix-refclock-sprintf
Open

Replace sprintf with snprintf in refclock_ripencc logging#26
kodareef5 wants to merge 1 commit intontp-project:stablefrom
kodareef5:fix-refclock-sprintf

Conversation

@kodareef5
Copy link
Copy Markdown

Four sprintf calls in ntpd/refclock_ripencc.c write formatted GPS receiver data into a 1024-byte logbuf without bounds checking. The C1 format string has 17 format specifiers including floating-point values. Replace with snprintf bounded by sizeof(logbuf).

Four sprintf calls write formatted GPS receiver data into a
1024-byte logbuf without bounds checking. The C1 format string
at line 1677 has 17 format specifiers including floating-point
values that can produce long output. Replace with snprintf
bounded by sizeof(logbuf).
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.

1 participant