Search
lxdream.org :: lxdream :: r1272:0b947d924029
lxdream 0.9.1
released Jun 29
Download Now
changeset1272:0b947d924029
parent1271:3edc4bdd7c0b
child1273:32b2a340f8b3
authornkeynes
dateSat Mar 17 08:36:17 2012 +1000 (9 years ago)
Fix uninitialised sinlen in gdb_server_connect_callback, patch from Guinux,
thanks!
src/gdbserver.c
1.1 --- a/src/gdbserver.c Thu Mar 15 08:26:06 2012 +1000
1.2 +++ b/src/gdbserver.c Sat Mar 17 08:36:17 2012 +1000
1.3 @@ -491,7 +491,7 @@
1.4 gboolean gdb_server_connect_callback( int fd, gpointer data )
1.5 {
1.6 struct sockaddr_in sin;
1.7 - socklen_t sinlen;
1.8 + socklen_t sinlen = sizeof(sin);
1.9 struct gdb_server *server = (struct gdb_server *)data;
1.10 int conn_fd = accept( fd, (struct sockaddr *)&sin, &sinlen);
1.11 if( conn_fd != -1 ) {
.