mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	dtudcfonted/gpftobdf.c: Coverity CID 175168; NULL deref
This commit is contained in:
		
							parent
							
								
									45bccb474c
								
							
						
					
					
						commit
						ba95bbc073
					
				
					 1 changed files with 13 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1466,8 +1466,18 @@ int	fix ;
 | 
			
		|||
 | 
			
		||||
		bitmap = pcf->bitmaps + getINT32( (unsigned char *)(pcf->offsets + encodingOffset),
 | 
			
		||||
		    pcf->bmp_fmt);
 | 
			
		||||
		invertBits( bitmap + bmp_adj, pcf->bmp_fmt, ptn_width, cpy_height, bmp_ptn + ptn_adj);
 | 
			
		||||
                /* Only do this if non-NULL... */
 | 
			
		||||
                if (bmp_ptn)
 | 
			
		||||
                {
 | 
			
		||||
                    invertBits( bitmap + bmp_adj, pcf->bmp_fmt,
 | 
			
		||||
                                ptn_width, cpy_height, bmp_ptn + ptn_adj);
 | 
			
		||||
                    putPtn( (unsigned char *)bmp_ptn, ptn_width, ptn_height );
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    fprintf(stderr, "%s: bmp_ptn is NULL", __FUNCTION__);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                fprintf(stdout,"ENDCHAR\n");
 | 
			
		||||
		if( fix == FALSE )	free(bmp_ptn);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue