mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Fix node:http UAF (#18485)
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com> Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
This commit is contained in:
@@ -131,7 +131,7 @@ public:
|
||||
getLoopData()->setCorkedSocket(this, SSL);
|
||||
}
|
||||
|
||||
/* Returns wheter we are corked or not */
|
||||
/* Returns whether we are corked */
|
||||
bool isCorked() {
|
||||
return getLoopData()->isCorkedWith(this);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ private:
|
||||
}
|
||||
|
||||
/* Signal broken HTTP request only if we have a pending request */
|
||||
if (httpResponseData->onAborted) {
|
||||
if (httpResponseData->onAborted != nullptr && httpResponseData->userData != nullptr) {
|
||||
httpResponseData->onAborted((HttpResponse<SSL> *)s, httpResponseData->userData);
|
||||
}
|
||||
|
||||
|
||||
@@ -660,12 +660,6 @@ public:
|
||||
return httpResponseData->socketData;
|
||||
}
|
||||
|
||||
void setSocketData(void* socketData) {
|
||||
HttpResponseData<SSL> *httpResponseData = getHttpResponseData();
|
||||
|
||||
httpResponseData->socketData = socketData;
|
||||
}
|
||||
|
||||
void setWriteOffset(uint64_t offset) {
|
||||
HttpResponseData<SSL> *httpResponseData = getHttpResponseData();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user