From 8a38e7724619830db952cf05d81713412c0fd461 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 25 May 1998 07:18:31 +0000 Subject: [PATCH] (make-frame-on-display): Check for nonsense display name. --- lisp/frame.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/frame.el b/lisp/frame.el index 326677339ae..b6fcf8ab7fe 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -414,6 +414,8 @@ These supersede the values given in `default-frame-alist'." "Make a frame on display DISPLAY. The optional second argument PARAMETERS specifies additional frame parameters." (interactive "sMake frame on display: ") + (or (string-match "\\`[^:]+:[0-9]+\\(:[0-9]+\\)?\\'" display) + (error "Invalid display, not HOST:SERVER or HOST:SERVER:SCREEN")) (make-frame (cons (cons 'display display) parameters))) (defun make-frame-command () -- 2.39.2