From a41f9076c597714075b0ecd5f41cd6f6cfd2add2 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 20 Dec 2015 15:08:27 +0100 Subject: LAB: Fix malloc pointed by eriktorbjorn --- engines/lab/resource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp index 1b4bfd76a6..a0f635069e 100644 --- a/engines/lab/resource.cpp +++ b/engines/lab/resource.cpp @@ -310,7 +310,7 @@ Action *Resource::readAction(Common::File *file) { action->_param3 = file->readSint16LE(); if (action->_actionType == SHOWMESSAGES) { - char **messages = (char **)malloc(action->_param1 * 4); + char **messages = (char **)malloc(action->_param1 * sizeof(char *)); Common::String tmp; for (int i = 0; i < action->_param1; i++) { -- cgit v1.2.3