Skip to content

Commit 139f5d8

Browse files
committed
Fix sprintf that should be snprintf
c084d1f ("Prevent overflow in ax25 and netrom") added the length argument, but didn't change the function name.
1 parent b723690 commit 139f5d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ax25.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static const char *AX25_print(const char *ptr)
6464
i = ((ptr[6] & 0x1E) >> 1);
6565
if (i != 0) {
6666
int l = strlen(buff);
67-
sprintf(&buff[l], sizeof(buff)-l, "-%d", i);
67+
snprintf(&buff[l], sizeof(buff)-l, "-%d", i);
6868
}
6969

7070
return (buff);

0 commit comments

Comments
 (0)