1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-22 13:40:00 +00:00

Merge pull request #1090 from AGraber/patch-1

Fix buffer overflow on re3_sem_open/close
This commit is contained in:
erorcun 2021-02-16 20:19:07 +03:00 committed by GitHub
commit eccf87acc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ re3_sem_close(sem_t* sem)
sem_t* sem_t*
re3_sem_open(const char* format, ...) re3_sem_open(const char* format, ...)
{ {
char semName[20]; char semName[21];
va_list va; va_list va;
va_start(va, format); va_start(va, format);
vsprintf(semName, format, va); vsprintf(semName, format, va);
@ -71,7 +71,7 @@ re3_sem_close(sem_t* sem, const char* format, ...)
{ {
sem_close(sem); sem_close(sem);
char semName[20]; char semName[21];
va_list va; va_list va;
va_start(va, format); va_start(va, format);
vsprintf(semName, format, va); vsprintf(semName, format, va);