Skip to content

Commit 9aab29a

Browse files
committed
coll_base_util.c: ensure buffer is long enough
Ensure that a buffer is long enough to hold the trailing \0. Signed-off-by: Jeff Squyres <jeff@squyres.com>
1 parent dbbf187 commit 9aab29a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ompi/mca/coll/base/coll_base_util.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2014-2020 Research Organization for Information Science
1313
* and Technology (RIST). All rights reserved.
14+
* Copyright (c) 2023 Jeffrey M. Squyres. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -398,7 +399,7 @@ int ompi_coll_base_file_getnext_long(FILE *fptr, int *fileline, long* val)
398399

399400
int ompi_coll_base_file_getnext_string(FILE *fptr, int *fileline, char** val)
400401
{
401-
char trash, token[32];
402+
char trash, token[33];
402403
int rc;
403404

404405
*val = NULL; /* security in case we fail */

0 commit comments

Comments
 (0)