comparison src/os_unix.c @ 15306:7fff2d18e191 v8.1.0661

patch 8.1.0661: clipboard regexp might be used recursively commit https://github.com/vim/vim/commit/a8bfa1727a370d659dc0ccc3f0fd1763b10b5457 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 29 22:28:46 2018 +0100 patch 8.1.0661: clipboard regexp might be used recursively Problem: Clipboard regexp might be used recursively. Solution: Check for recursive use and bail out.
author Bram Moolenaar <Bram@vim.org>
date Sat, 29 Dec 2018 22:30:05 +0100
parents 4aea6c2f56a8
children 55ccc2d353bd
comparison
equal deleted inserted replaced
15305:79d2bc5fa18d 15306:7fff2d18e191
1686 return TRUE; 1686 return TRUE;
1687 #endif 1687 #endif
1688 if (x_no_connect) 1688 if (x_no_connect)
1689 return FALSE; 1689 return FALSE;
1690 1690
1691 /* Check for a match with "exclude:" from 'clipboard'. */ 1691 // Check for a match with "exclude:" from 'clipboard'.
1692 if (clip_exclude_prog != NULL) 1692 if (clip_exclude_prog != NULL)
1693 { 1693 {
1694 // Just in case we get called recursively, return FALSE. This could
1695 // happen if vpeekc() is used while executing the prog and it causes a
1696 // related callback to be invoked.
1697 if (regprog_in_use(clip_exclude_prog))
1698 return FALSE;
1699
1694 if (vim_regexec_prog(&clip_exclude_prog, FALSE, T_NAME, (colnr_T)0)) 1700 if (vim_regexec_prog(&clip_exclude_prog, FALSE, T_NAME, (colnr_T)0))
1695 return FALSE; 1701 return FALSE;
1696 } 1702 }
1697 return TRUE; 1703 return TRUE;
1698 } 1704 }