summaryrefslogtreecommitdiff
path: root/src/core/stdfile
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stdfile')
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index d9b54d4f8a..a1e11bafb5 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -222,12 +222,9 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
db_event_markRead(dat->hContact, dat->hDbEvent);
- DBEVENTINFO dbei = {};
- dbei.cbBlob = db_event_getBlobSize(dat->hDbEvent);
- if (dbei.cbBlob > 4 && dbei.cbBlob <= 8196) {
- dbei.pBlob = (PBYTE)alloca(dbei.cbBlob + 1);
- db_event_get(dat->hDbEvent, &dbei);
- dbei.pBlob[dbei.cbBlob] = 0;
+ DB::EventInfo dbei;
+ dbei.cbBlob = -1;
+ if (!db_event_get(dat->hDbEvent, &dbei)) {
dat->fs = cle->lParam ? (HANDLE)cle->lParam : (HANDLE)*(PDWORD)dbei.pBlob;
char *str = (char*)dbei.pBlob + 4;