projects
/
profile
/
ivi
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0a96d2
)
libupload: Fixing memset call
author
Erwan Velu
<erwanaliasr1@gmail.com>
Mon, 18 Apr 2011 19:07:33 +0000
(21:07 +0200)
committer
Erwan Velu
<erwanaliasr1@gmail.com>
Mon, 18 Apr 2011 19:07:33 +0000
(21:07 +0200)
We have to use the size of the element, not the size of the pointer.
com32/libupload/upload_tftp.c
patch
|
blob
|
history
diff --git
a/com32/libupload/upload_tftp.c
b/com32/libupload/upload_tftp.c
index
d97cbd3
..
091c193
100644
(file)
--- a/
com32/libupload/upload_tftp.c
+++ b/
com32/libupload/upload_tftp.c
@@
-51,7
+51,7
@@
static int send_ack_packet(struct tftp_state *tftp,
ireg.eax.w[0] = 0x0009;
for (timeout = timeouts ; *timeout ; timeout++) {
- memset(uw, 0, sizeof uw);
+ memset(uw, 0, sizeof
*
uw);
memcpy(uw+1, pkt, len);
uw->ip = tftp->srv_ip;
uw->gw = tftp->srv_gw;
@@
-69,7
+69,7
@@
static int send_ack_packet(struct tftp_state *tftp,
start = times(NULL);
do {
- memset(ur, 0, sizeof ur);
+ memset(ur, 0, sizeof
*
ur);
ur->src_ip = tftp->srv_ip;
ur->dest_ip = tftp->my_ip;
ur->s_port = tftp->srv_port;