[waffle] [PATCH 07/17] core: Add arithmetic functions that detect overflow

Emil Velikov emil.l.velikov at gmail.com
Wed Jan 21 06:06:06 PST 2015


On 4 January 2015 at 22:03, Chad Versace <chad.versace at intel.com> wrote:
> Define the function below. All act on size_t inputs.
>     wcore_add_size
>     wcore_iadd_size : in-place addition
>     wcore_mul_size
>     wcore_imul_size : in-place multiplication
>
> Future patches will use the functions to safely calculate the 'size'
> value given to malloc.
>
Can you squash this trivial fix (for msvc inline we need to include
the c99_compat.h header)

diff --git a/src/waffle/core/wcore_util.h b/src/waffle/core/wcore_util.h
index acb46ce..183134f 100644
--- a/src/waffle/core/wcore_util.h
+++ b/src/waffle/core/wcore_util.h
@@ -26,6 +26,7 @@
 #pragma once

 #include <stddef.h>
+#include "c99_compat.h"


Thanks
Emil


More information about the waffle mailing list