From: Hosang Kim Date: Mon, 12 Dec 2022 09:04:11 +0000 (+0900) Subject: aurum: fix using calloc instead of variable-sized array. X-Git-Tag: accepted/tizen/unified/20221215.051045^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f2e8dac34da4f1e5c4d6d0a3537226dd9e99f10;p=platform%2Fcore%2Fuifw%2Faurum.git aurum: fix using calloc instead of variable-sized array. C++ template doesn't support variable-sized array. Change-Id: I57b3fd7e2a117ead55ac705b867144885433d938 --- diff --git a/org.tizen.aurum-bootstrap/src/Commands/TakeScreenshotCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/TakeScreenshotCommand.cc index b9e5c0a..2a62457 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/TakeScreenshotCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/TakeScreenshotCommand.cc @@ -50,7 +50,7 @@ TakeScreenshotCommand::TakeScreenshotCommand( std::ifstream ifs(path, std::ifstream::binary); ::aurum::RspTakeScreenshot rsp; int size = mDevice->getScreenSize().width * mDevice->getScreenSize().height; - char buf[size]; + char *buf = (char *) calloc(size, sizeof(char)); while (!ifs.eof()) { ifs.read(buf, size);