aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorRichard Carlsson <[email protected]>2015-04-14 15:16:25 +0200
committerBjörn Gustavsson <[email protected]>2015-05-07 14:40:32 +0200
commit39ce03094edb3bc53ad671636355be53564a222d (patch)
treec423fbde89d72fd0bbf056928139f5ad43b45b68 /erts/emulator/beam
parent8b85c571f7c31bda6695c8179ef286c30862ce54 (diff)
downloadotp-39ce03094edb3bc53ad671636355be53564a222d.tar.gz
otp-39ce03094edb3bc53ad671636355be53564a222d.tar.bz2
otp-39ce03094edb3bc53ad671636355be53564a222d.zip
Gracefully handle empty md5 field in module_info
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/beam_load.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 282aa71109..29d4dce3e2 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -5695,7 +5695,11 @@ md5_of_module(Process* p, /* Process whose heap to use. */
return THE_NON_VALUE;
}
code = modp->curr.code;
- res = new_binary(p, (byte *) code[MI_MD5_PTR], MD5_SIZE);
+ if (code[MI_MD5_PTR] != 0) {
+ res = new_binary(p, (byte *) code[MI_MD5_PTR], MD5_SIZE);
+ } else {
+ res = am_undefined;
+ }
return res;
}