mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-13 17:00:19 +00:00
Fix #1453 - do not allow empty wakeup buffer
This commit is contained in:
1 parent
59c4dfa33b
commit
e565a7e73d
5 files changed
+6
-10
No files matched your search
+1
-5
@@ -902,11 +902,7 @@ static bool p_remove(const char *path) {
|
||||
}
|
||||
|
||||
static bool p_mkdir(const char *path) {
|
||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
return mkdir(path) == 0;
|
||||
#else
|
||||
return mkdir(path, 0775) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -3511,7 +3507,7 @@ static bool mg_socketpair(SOCKET sp[2], union usa usa[2]) {
|
||||
}
|
||||
|
||||
void mg_mgr_wakeup(struct mg_connection *c, const void *buf, size_t len) {
|
||||
LOG(LL_INFO, ("skt: %p", c->pfn_data));
|
||||
if (buf == NULL || len == 0) buf = (void *) "", len = 1;
|
||||
send((SOCKET) (size_t) c->pfn_data, (const char *) buf, len, MSG_NONBLOCKING);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user