[erlang-patches] [PATCH] efile_drv: unsigned integer may overflow in error message

Michael Santos michael.santos@REDACTED
Wed Apr 6 02:46:28 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 %u bytes of memory\n", s);
     return p;
 }
 
-- 
1.7.0.4




More information about the erlang-patches mailing list