From: Karl Heuer Date: Sat, 29 Aug 1998 15:55:28 +0000 (+0000) Subject: (x_create_bitmap_from_file): Fail immediately if magic. X-Git-Tag: emacs-20.4~1808 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=66cb9c073130581af4df23f0115b021761b330d5;p=emacs.git (x_create_bitmap_from_file): Fail immediately if magic. --- diff --git a/src/xfns.c b/src/xfns.c index 4457d2200d4..48bda27702a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -590,6 +590,9 @@ x_create_bitmap_from_file (f, file) fd = openp (Vx_bitmap_file_path, file, "", &found, 0); if (fd < 0) return -1; + /* XReadBitmapFile won't handle magic file names. */ + if (fd == 0) + return -1; close (fd); filename = (char *) XSTRING (found)->data;