[erlang-patches] [PATCH] Unsigned integer may overflow in error message

Michael Santos michael.santos@REDACTED
Wed Apr 6 20:56:43 CEST 2011


---
 erts/emulator/drivers/common/efile_drv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c
index 4e9b500..6e62342 100644
--- a/erts/emulator/drivers/common/efile_drv.c
+++ b/erts/emulator/drivers/common/efile_drv.c
@@ -410,7 +410,7 @@ struct t_data
 static void *ef_safe_alloc(Uint s)
 {
     void *p = EF_ALLOC(s);
-    if (!p) erl_exit(1, "efile drv: Can't allocate %d bytes of memory\n", s);
+    if (!p) erl_exit(1, "efile drv: Can't allocate %lu bytes of memory\n", (unsigned long)s);
     return p;
 }
 
-- 
1.7.0.4




More information about the erlang-patches mailing list