[geany/geany-plugins] 2b38b7: debugger: Avoid a theoretically possible buffer overflow

Colomban Wendling git-noreply at xxxxx
Sun Nov 15 17:28:16 UTC 2015


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sat, 25 Oct 2014 12:42:35 UTC
Commit:      2b38b72ab87534f652919fd3013576bb38c3ddbc
             https://github.com/geany/geany-plugins/commit/2b38b72ab87534f652919fd3013576bb38c3ddbc

Log Message:
-----------
debugger: Avoid a theoretically possible buffer overflow


Modified Paths:
--------------
    debugger/src/dbm_gdb.c

Modified: debugger/src/dbm_gdb.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -227,7 +227,7 @@ static void gdb_input_write_line(const gchar *line)
 	gsize count;
 	
 	char command[1000];
-	sprintf(command, "%s\n", line);
+	snprintf(command, sizeof command, "%s\n", line);
 	
 	while (strlen(command))
 	{



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list