Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/netpgp/dist/bindings/lua netpgp: fail if...



details:   https://anonhg.NetBSD.org/src/rev/5223e00a65f4
branches:  trunk
changeset: 369658:5223e00a65f4
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 27 08:57:23 2022 +0000

description:
netpgp: fail if the shared library cannot be loaded

diffstat:

 crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r f3f9d55df020 -r 5223e00a65f4 crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua
--- a/crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua   Sat Aug 27 08:36:41 2022 +0000
+++ b/crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua   Sat Aug 27 08:57:23 2022 +0000
@@ -50,7 +50,7 @@
        extension = ".dylib"
        io.close(f)
 end
-glupkg = package.loadlib("libluanetpgp" .. extension, "luaopen_netpgp")
+glupkg = assert(package.loadlib("libluanetpgp" .. extension, "luaopen_netpgp"))
 netpgp = glupkg()
 
 -- initialise
@@ -79,7 +79,6 @@
 -- initialise everything
 netpgp.init(pgp)
 
-local i
 for i = 1, #args do
        if options.encrypt then
                -- encrypt a file



Home | Main Index | Thread Index | Old Index