From 66cb9c073130581af4df23f0115b021761b330d5 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Sat, 29 Aug 1998 15:55:28 +0000 Subject: [PATCH] (x_create_bitmap_from_file): Fail immediately if magic. --- src/xfns.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.2