Skip to content

Commit 1031521

Browse files
Merge pull request #366 from jabraham17/fix-overflow
Fix buffer overflow in binders.c
2 parents af9195e + 063335e commit 1031521

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/affinity/binders.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void INTERNAL qt_affinity_init(qthread_shepherd_id_t *nbshepherds,
142142
}
143143

144144
} else {
145-
char *bstr = qt_malloc(strlen(bindstr));
145+
char *bstr = qt_malloc(strlen(bindstr) + 1);
146146
strcpy(bstr, bindstr);
147147
int i, j;
148148
sheps.num = 1;

0 commit comments

Comments
 (0)