mirror of
				https://github.com/SwallowOS/xorg_lib_libxcb
				synced 2025-11-04 05:28:12 +08:00 
			
		
		
		
	Check strdup for NULL return value.
_xcb_open does not check strdup's return value for NULL if launchd suport was configured. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
		
				
					committed by
					
						
						Uli Schlachter
					
				
			
			
				
	
			
			
			
						parent
						
							ee9dfc9a76
						
					
				
				
					commit
					f830eb93c9
				
			@@ -265,6 +265,8 @@ static int _xcb_open(const char *host, char *protocol, const int display)
 | 
			
		||||
    struct stat sbuf;
 | 
			
		||||
    if (0 == stat(host, &sbuf)) {
 | 
			
		||||
        file = strdup(host);
 | 
			
		||||
        if(file == NULL)
 | 
			
		||||
            return -1;
 | 
			
		||||
        filelen = actual_filelen = strlen(file);
 | 
			
		||||
    } else
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user