Skip to content

Commit 118a8fc

Browse files
committed
Size error buffers the same
.. it quiets some stringop-truncation diagnostics
1 parent ff49db2 commit 118a8fc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/libnml/rcs/rcs_print.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ long rcs_print_mode_flags = PRINT_RCS_ERRORS;
4747
FILE *rcs_print_file_stream = NULL;
4848
char rcs_print_file_name[80] = "rcs_out.txt";
4949

50-
char last_error_bufs[4][100];
50+
char last_error_bufs[4][256];
5151
int error_bufs_initialized = 0;
5252
int last_error_buf_filled = 0;
5353

@@ -287,7 +287,7 @@ int separate_words(char **_dest, int _max, char *_src)
287287

288288
int rcs_vprint(const char *_fmt, va_list _args, int save_string)
289289
{
290-
static char temp_string[256];
290+
static char temp_string[error_buf_size];
291291

292292
if (NULL == _fmt) {
293293
return (EOF);

src/libnml/rcs/rcs_print.hh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ extern "C" {
199199
extern int max_rcs_errors_to_print;
200200
extern int rcs_errors_printed;
201201

202-
extern char last_error_bufs[4][100];
202+
enum { error_buf_size = 256 };
203+
extern char last_error_bufs[4][error_buf_size];
203204
extern int last_error_buf_filled;
204205

205206
#endif

0 commit comments

Comments
 (0)