From ed099befbb300d6f9c393cb415fdb2a68c2ef471 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 15 May 2015 16:30:52 -0700 Subject: Merge to XFA: Abort on OOM by default in FX_Alloc(). Original Review URL: https://codereview.chromium.org/1128043009 Original Review URL: https://codereview.chromium.org/1142463005 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1144683002 --- core/src/fxcodec/lbmp/fx_bmp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/fxcodec/lbmp') diff --git a/core/src/fxcodec/lbmp/fx_bmp.cpp b/core/src/fxcodec/lbmp/fx_bmp.cpp index 4c6eb61757..e868fdeaef 100644 --- a/core/src/fxcodec/lbmp/fx_bmp.cpp +++ b/core/src/fxcodec/lbmp/fx_bmp.cpp @@ -882,7 +882,7 @@ FX_BOOL _bmp_encode_image( bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf, FX pal_size = sizeof(FX_DWORD) * bmp_ptr->info_header.biClrUsed; } dst_size = head_size + sizeof(FX_DWORD) * bmp_ptr->pal_num; - dst_buf = FX_AllocNL(FX_BYTE, dst_size); + dst_buf = FX_TryAlloc(FX_BYTE, dst_size); if (dst_buf == NULL) { return FALSE; } -- cgit v1.2.3