Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168524586
D17081.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17081.diff
View Options
Index: head/stand/libsa/tftp.c
===================================================================
--- head/stand/libsa/tftp.c
+++ head/stand/libsa/tftp.c
@@ -490,6 +490,9 @@
size_t *resid /* out */)
{
struct tftp_handle *tftpfile;
+ int rc;
+
+ rc = 0;
tftpfile = (struct tftp_handle *) f->f_fsdata;
while (size > 0) {
@@ -501,19 +504,19 @@
if (tftpfile->currblock > needblock) { /* seek backwards */
tftp_senderr(tftpfile, 0, "No error: read aborted");
- tftp_makereq(tftpfile); /* no error check, it worked
- * for open */
+ rc = tftp_makereq(tftpfile);
+ if (rc != 0)
+ break;
}
while (tftpfile->currblock < needblock) {
- int res;
- res = tftp_getnextblock(tftpfile);
- if (res) { /* no answer */
+ rc = tftp_getnextblock(tftpfile);
+ if (rc) { /* no answer */
#ifdef TFTP_DEBUG
printf("tftp: read error\n");
#endif
- return (res);
+ return (rc);
}
if (tftpfile->islastblock)
break;
@@ -553,7 +556,7 @@
if (resid)
*resid = size;
- return (0);
+ return (rc);
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 29, 8:24 PM (4 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37539060
Default Alt Text
D17081.diff (1 KB)
Attached To
Mode
D17081: libsa: validate tftp_makereq() after we did reset the read
Attached
Detach File
Event Timeline
Log In to Comment