Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137360514
D16853.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
793 B
Referenced Files
None
Subscribers
None
D16853.id.diff
View Options
Index: head/libexec/tftpd/tftp-file.c
===================================================================
--- head/libexec/tftpd/tftp-file.c
+++ head/libexec/tftpd/tftp-file.c
@@ -110,10 +110,10 @@
{
size_t i;
static size_t n = 0, in = 0;
- static int newline = 0;
+ static int newline = -1;
if (init) {
- newline = 0;
+ newline = -1;
n = 0;
in = 0;
return 0 ;
@@ -124,9 +124,9 @@
*/
i = 0;
- if (newline) {
+ if (newline != -1) {
buffer[i++] = newline;
- newline = 0;
+ newline = -1;
}
while (i < count) {
@@ -161,7 +161,7 @@
if (i > count) {
/*
- * Whoops... that isn't alllowed (but it will happen
+ * Whoops... that isn't allowed (but it will happen
* when there is a CR or LF at the end of the buffer)
*/
newline = buffer[i-1];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 23, 7:08 PM (8 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26027520
Default Alt Text
D16853.id.diff (793 B)
Attached To
Mode
D16853: tftpd: Fix data corruption bug with netascii
Attached
Detach File
Event Timeline
Log In to Comment