From: Eli Zaretskii Date: Tue, 23 May 2023 14:53:07 +0000 (+0300) Subject: ; Support SQLite3 extensions on macOS X-Git-Tag: emacs-29.0.92~106 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=765edc204d4;p=emacs.git ; Support SQLite3 extensions on macOS * src/sqlite.c (Fsqlite_load_extension): Support *.dylib extensions. (Bug#63653) --- diff --git a/src/sqlite.c b/src/sqlite.c index 852e3746ef4..fd528f2b0d5 100644 --- a/src/sqlite.c +++ b/src/sqlite.c @@ -730,10 +730,12 @@ Only modules on Emacs' list of allowed modules can be loaded. */) bool do_allow = false; for (const char **allow = allowlist; *allow; allow++) { - if (strlen (*allow) < strlen (name) - && !strncmp (*allow, name, strlen (*allow)) - && (!strcmp (name + strlen (*allow), ".so") - || !strcasecmp (name + strlen (*allow), ".dll"))) + ptrdiff_t allow_len = strlen (*allow); + if (allow_len < strlen (name) + && !strncmp (*allow, name, allow_len) + && (!strcmp (name + allow_len, ".so") + ||!strcmp (name + allow_len, ".dylib") + || !strcasecmp (name + allow_len, ".dll"))) { do_allow = true; break;