aboutsummaryrefslogtreecommitdiff
path: root/contrib/seg/segparse.y
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/seg/segparse.y')
-rw-r--r--contrib/seg/segparse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/seg/segparse.y b/contrib/seg/segparse.y
index 10a4227c190..3ffcbff4170 100644
--- a/contrib/seg/segparse.y
+++ b/contrib/seg/segparse.y
@@ -144,7 +144,7 @@ float seg_atof ( char *value ) {
sscanf(value, "%f", &result);
if ( errno ) {
- sprintf(buf, "numeric value %s unrepresentable", value);
+ snprintf(buf, 256, "numeric value %s unrepresentable", value);
reset_parse_buffer();
elog(ERROR, buf);
}
@@ -165,8 +165,9 @@ int seg_yyerror ( char *msg ) {
position = parse_buffer_pos() > parse_buffer_size() ? parse_buffer_pos() - 1 : parse_buffer_pos();
- sprintf(
+ snprintf(
buf,
+ 256,
"%s at or near position %d, character ('%c', \\%03o), input: '%s'\n",
msg,
position,