mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-03 17:59:07 -04:00
56 lines
1.7 KiB
Plaintext
56 lines
1.7 KiB
Plaintext
$NetBSD: patch-bj,v 1.4 2008/07/14 23:01:32 christos Exp $
|
|
|
|
--- clients/uil/UilDiags.c.orig 2006-04-06 09:24:06.000000000 -0400
|
|
+++ clients/uil/UilDiags.c 2008-06-28 16:17:21.000000000 -0400
|
|
@@ -317,13 +317,13 @@
|
|
*/
|
|
|
|
#ifndef NO_MESSAGE_CATALOG
|
|
- sprintf( loc_buffer,
|
|
+ snprintf( loc_buffer, sizeof(loc_buffer),
|
|
catgets(uil_catd, UIL_SET_MISC,
|
|
UIL_MISC_0, "\t\t line: %d file: %s"),
|
|
az_src_rec->w_line_number,
|
|
src_get_file_name( az_src_rec ) );
|
|
#else
|
|
- sprintf( loc_buffer,
|
|
+ snprintf( loc_buffer, sizeof(loc_buffer),
|
|
"\t\t line: %d file: %s",
|
|
az_src_rec->w_line_number,
|
|
src_get_file_name( az_src_rec ) );
|
|
@@ -371,7 +371,7 @@
|
|
|
|
if (l_start_column != diag_k_no_column)
|
|
#ifndef NO_MESSAGE_CATALOG
|
|
- sprintf(loc_buffer,
|
|
+ snprintf(loc_buffer, sizeof(loc_buffer),
|
|
catgets(uil_catd, UIL_SET_MISC,
|
|
UIL_MISC_1,
|
|
"\t\t line: %d position: %d file: %s"),
|
|
@@ -379,7 +379,7 @@
|
|
l_start_column + 1,
|
|
src_get_file_name( az_src_rec ) );
|
|
#else
|
|
- sprintf(loc_buffer,
|
|
+ snprintf(loc_buffer, sizeof(loc_buffer),
|
|
"\t\t line: %d position: %d file: %s",
|
|
az_src_rec->w_line_number,
|
|
l_start_column + 1,
|
|
@@ -387,13 +387,14 @@
|
|
#endif
|
|
else
|
|
#ifndef NO_MESSAGE_CATALOG
|
|
- sprintf( loc_buffer, catgets(uil_catd, UIL_SET_MISC,
|
|
+ snprintf( loc_buffer, sizeof(loc_buffer),
|
|
+ catgets(uil_catd, UIL_SET_MISC,
|
|
UIL_MISC_0,
|
|
"\t\t line: %d file: %s"),
|
|
az_src_rec->w_line_number,
|
|
src_get_file_name( az_src_rec ) );
|
|
#else
|
|
- sprintf( loc_buffer,
|
|
+ snprintf( loc_buffer, sizeof(loc_buffer),
|
|
"\t\t line: %d file: %s",
|
|
az_src_rec->w_line_number,
|
|
src_get_file_name( az_src_rec ) );
|