Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161952994
D24454.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
D24454.diff
View Options
Index: head/libexec/tftpd/tftp-transfer.c
===================================================================
--- head/libexec/tftpd/tftp-transfer.c
+++ head/libexec/tftpd/tftp-transfer.c
@@ -40,6 +40,7 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <syslog.h>
#include "tftp-file.h"
@@ -124,7 +125,13 @@
acktry++;
ts->retries++;
- seek_file(window[0].offset);
+ if (seek_file(window[0].offset) != 0) {
+ tftp_log(LOG_ERR,
+ "seek_file failed: %s",
+ strerror(errno));
+ send_error(peer, errno + 100);
+ goto abort;
+ }
*block = window[0].block;
windowblock = 0;
goto read_block;
@@ -158,7 +165,13 @@
/* Resend the current window. */
ts->retries++;
- seek_file(window[0].offset);
+ if (seek_file(window[0].offset) != 0) {
+ tftp_log(LOG_ERR,
+ "seek_file failed: %s",
+ strerror(errno));
+ send_error(peer, errno + 100);
+ goto abort;
+ }
*block = window[0].block;
windowblock = 0;
goto read_block;
@@ -183,7 +196,14 @@
if (debug&DEBUG_SIMPLE)
tftp_log(LOG_DEBUG,
"Partial ACK");
- seek_file(window[i + 1].offset);
+ if (seek_file(window[i + 1].offset) !=
+ 0) {
+ tftp_log(LOG_ERR,
+ "seek_file failed: %s",
+ strerror(errno));
+ send_error(peer, errno + 100);
+ goto abort;
+ }
*block = window[i + 1].block;
windowblock = 0;
ts->retries++;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 9, 7:40 AM (7 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34881147
Default Alt Text
D24454.diff (1 KB)
Attached To
Mode
D24454: Abort transfer if fseeko() fails.
Attached
Detach File
Event Timeline
Log In to Comment