From 5163b6fcd0fbd54c65b3d96e9ba85051611ff33e Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Wed, 30 May 2007 17:26:24 +0000 Subject: [PATCH] Use strncpy() instead of strcpy() to avoid buffer overflows. 2007-05-30 Mukund Sivaraman * plug-ins/common/decompose.c: Use strncpy() instead of strcpy() to avoid buffer overflows. svn path=/trunk/; revision=22674 --- ChangeLog | 5 +++++ plug-ins/common/decompose.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 408cda8507..9cb0297749 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-30 Mukund Sivaraman + + * plug-ins/common/decompose.c: Use strncpy() instead of strcpy() to + avoid buffer overflows. + 2007-05-30 Mukund Sivaraman * plug-ins/common/compose.c: Specify maximum field width in diff --git a/plug-ins/common/decompose.c b/plug-ins/common/decompose.c index d37da0a377..db0f67f830 100644 --- a/plug-ins/common/decompose.c +++ b/plug-ins/common/decompose.c @@ -1560,7 +1560,7 @@ decompose_dialog (void) gtk_widget_destroy (dialog); if (run) - strcpy (decovals.extract_type, extract[extract_idx].type); + strncpy (decovals.extract_type, extract[extract_idx].type, 31); return run; }