summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-03-04 00:12:10 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-03 15:33:24 -0800
commitb0df54071e7731b7f7a4b1df481200865f5a1e1a (patch)
treedfe4649bb23ea1b5e4c606d70a6365ca696f01a4
parent9fcb28a6f5f5b9c3dcc6a6f40760cbe18f31f76f (diff)
downloadsubsurface-b0df54071e7731b7f7a4b1df481200865f5a1e1a.tar.gz
equipment.c: Fix potential buffer overflow in size_data_funct()
strcpy() with buffer[10], could overflow on most languages. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--equipment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/equipment.c b/equipment.c
index f0a9df478..19add3f4c 100644
--- a/equipment.c
+++ b/equipment.c
@@ -1336,7 +1336,7 @@ static void size_data_func(GtkTreeViewColumn *col,
{
int ml, mbar;
double size, pressure;
- char buffer[10];
+ char buffer[64];
gtk_tree_model_get(model, iter, CYL_SIZE, &ml, CYL_WORKP, &mbar, -1);
convert_volume_pressure(ml, mbar, &size, &pressure);