aboutsummaryrefslogtreecommitdiffstats
path: root/com32/libupload
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2011-04-18 21:07:33 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2011-04-18 21:07:33 +0200
commite152c1806905b77e878965ff589671db8c7d34dd (patch)
tree0aa08ea892dc790a819725635b1270d5bda07a38 /com32/libupload
parentd0a96d299773c892675b66b726e8cea1e47b86c8 (diff)
downloadsyslinux-e152c1806905b77e878965ff589671db8c7d34dd.tar.gz
syslinux-e152c1806905b77e878965ff589671db8c7d34dd.tar.xz
syslinux-e152c1806905b77e878965ff589671db8c7d34dd.zip
libupload: Fixing memset call
We have to use the size of the element, not the size of the pointer.
Diffstat (limited to 'com32/libupload')
-rw-r--r--com32/libupload/upload_tftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/libupload/upload_tftp.c b/com32/libupload/upload_tftp.c
index d97cbd3a..091c193c 100644
--- 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;