mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	libs/fst: Patch wx_len overread
This commit is contained in:
		
							parent
							
								
									67a0248186
								
							
						
					
					
						commit
						68e9317f1f
					
				
					 3 changed files with 12 additions and 0 deletions
				
			
		
							
								
								
									
										10
									
								
								libs/fst/00_PATCH_wx_len_overread.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								libs/fst/00_PATCH_wx_len_overread.patch
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | ||||||
|  | --- fstapi.cc
 | ||||||
|  | +++ fstapi.cc
 | ||||||
|  | @@ -6072,6 +6072,7 @@ for(;;)
 | ||||||
|  |                                                                  } | ||||||
|  |   | ||||||
|  |                                                          wx_len = snprintf(wx_buf, 32, "r%.16g", d); | ||||||
|  | +                                                        if (wx_len > 32 || wx_len < 0) wx_len = 32;
 | ||||||
|  |                                                          fstWritex(xc, wx_buf, wx_len); | ||||||
|  |                                                          } | ||||||
|  |                                                  } | ||||||
|  | @ -18,3 +18,4 @@ sed -i -e 's,"fastlz.c","fastlz.cc",' *.cc *.h | ||||||
| patch -p0 < 00_PATCH_win_zlib.patch | patch -p0 < 00_PATCH_win_zlib.patch | ||||||
| patch -p0 < 00_PATCH_win_io.patch | patch -p0 < 00_PATCH_win_io.patch | ||||||
| patch -p1 < 00_PATCH_strict_alignment.patch | patch -p1 < 00_PATCH_strict_alignment.patch | ||||||
|  | patch -p0 < 00_PATCH_wx_len_overread.patch | ||||||
|  |  | ||||||
|  | @ -6072,6 +6072,7 @@ for(;;) | ||||||
|                                                                 } |                                                                 } | ||||||
| 
 | 
 | ||||||
|                                                         wx_len = snprintf(wx_buf, 32, "r%.16g", d); |                                                         wx_len = snprintf(wx_buf, 32, "r%.16g", d); | ||||||
|  |                                                         if (wx_len > 32 || wx_len < 0) wx_len = 32; | ||||||
|                                                         fstWritex(xc, wx_buf, wx_len); |                                                         fstWritex(xc, wx_buf, wx_len); | ||||||
|                                                         } |                                                         } | ||||||
|                                                 } |                                                 } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue