mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 06:48:05 +01:00
Provide large enough buffer in test_util_sscanf()
This was causing crashes during unit test runs, as stack smashing protections got triggered. Issue spotted by weasel
This commit is contained in:
parent
4121e7f861
commit
582f747049
2 changed files with 7 additions and 1 deletions
6
changes/bug5449
Normal file
6
changes/bug5449
Normal file
|
@ -0,0 +1,6 @@
|
|||
o Minor bugfixes:
|
||||
- In the testsuite, provide a large enough buffer in the tor_sscanf
|
||||
unit test. We'd otherwise overrun that buffer and crash during the
|
||||
unit tests. Fixes bug 5449; bugfix on 0.2.3.12-alpha. Thanks weasel
|
||||
for spotting the bug.
|
||||
|
|
@ -1376,7 +1376,7 @@ static void
|
|||
test_util_sscanf(void)
|
||||
{
|
||||
unsigned u1, u2, u3;
|
||||
char s1[10], s2[10], s3[10], ch;
|
||||
char s1[20], s2[10], s3[10], ch;
|
||||
int r;
|
||||
|
||||
/* Simple tests (malformed patterns, literal matching, ...) */
|
||||
|
|
Loading…
Add table
Reference in a new issue