Binkd on Windows 10 32-bit. Is there a way to block a particular node
from doing a file request? I've one node who keeps requesting a packet (that doesn't exist) and that causes Binkd to crash! :-(
+ 11 Nov 15:20:41 [1980] pwd protected session (MD5)
+ 11 Nov 15:20:41 [1980] sending c:\OUTBOUND\000f1d91.th0 as
000f1d91.th0 (165816) - 11 Nov 15:20:41 [1980] receiving 61e1ed3d.pkt
(186 byte(s), off 0) ? 11 Nov 15:20:41 [1980] GET: remote requests
seeking 000f1d91.th0 to 180224, file size I64u
seeking 000f1d91.th0 to 180224, file size I64u
I suspect turning off logging temporarily will prevent the crash.
This should instead be fixed at the source, in sys.h:
Binkd on Windows 10 32-bit. Is there a way to block a particular node
from doing a file request? I've one node who keeps requesting a packet
(that doesn't exist) and that causes Binkd to crash! :-(
+ 11 Nov 15:20:41 [1980] pwd protected session (MD5)
+ 11 Nov 15:20:41 [1980] sending c:\OUTBOUND\000f1d91.th0 as
000f1d91.th0 (165816) - 11 Nov 15:20:41 [1980] receiving 61e1ed3d.pkt
(186 byte(s), off 0) ? 11 Nov 15:20:41 [1980] GET: remote requests
seeking 000f1d91.th0 to 180224, file size I64u
I suspect turning off logging temporarily will prevent the crash.
...
I don't have time to send a pull request, but for other developers reading this:
"I64u" is a printf-formatting bug. It should be "%I64u", which gets converted to the file size at runtime.
diff for protocol.c:
- Log (1, "GET: remote requests seeking %s to %" PRIuMAX ", file size " PRIuMAX,
+ Log (1, "GET: remote requests seeking %s to %" PRIuMAX ", file size %" PRIuMAX,
argv[0], (uintmax_t) offset, (uintmax_t) state->out.size);
- msg_sendf(state, M_ERR, "Invalid M_GET violates binkp: offset " PRIuMAX " after end of file, file %s size " PRIuMAX,
+ msg_sendf(state, M_ERR, "Invalid M_GET violates binkp: offset %" PRIuMAX " after end of file, file %s size %" PRIuMAX,
Though this isn't the only place in the binkd code where this bug exists.
Obviously checking whether PRIuMAX is prefixed with "%" in every call to Log() or msg_sendf() etc is visually difficult and error-prone.
This should instead be fixed at the source, in sys.h:
- #define PRIdMAX "I64i"
- #define PRIuMAX "I64u"
+ #define PRIdMAX "%I64i"
+ #define PRIuMAX "%I64u"
Then change the .c files that reference these macros accordingly.
- #define PRIdMAX "I64i"
- #define PRIuMAX "I64u"
+ #define PRIdMAX "%I64i"
+ #define PRIuMAX "%I64u"
Then change the .c files that reference these macros accordingly.
This way was choosen due to use of the format "%8" PRIuMAX in ftnq.c.
I'm not sure is it better to create another macro PRIuMAX8 or keep existing PRIdMAX without '%'.
I would never have thought of that -- many thanks! Would you
suggest turning off console logging, disk logging, or both?
I would never have thought of that -- many thanks! Would you
suggest turning off console logging, disk logging, or both?
So I turned off all logging, and guess what? Binkd still crashes!!! Is there an option to prevent a node from even connecting?
So I turned off all logging, and guess what? Binkd still crashes!!!
* change their session password & don't tell them; or,
* if there is none yet set, set a session password & don't tell
them.
No, I'm not. What is -C supposed to do?
No, I'm not. What is -C supposed to do?
Sysop: | altere |
---|---|
Location: | Houston, TX |
Users: | 66 |
Nodes: | 4 (0 / 4) |
Uptime: | 00:58:30 |
Calls: | 635 |
Calls today: | 2 |
Files: | 7,638 |
Messages: | 292,269 |