mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	backtrace: fix off-by-one on string output
sizeof("foo") includes the trailing null byte, so all the output had
nulls through it. Most terminals quietly ignore it, but it makes some
tools misdetect file types and other annoyances.
Easy fix: subtract 1.
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16862
			
			
This commit is contained in:
		
							parent
							
								
									7cbe7bbbd4
								
							
						
					
					
						commit
						6604fe9a06
					
				| @ -38,7 +38,7 @@ | ||||
|  */ | ||||
| #define	spl_bt_write_n(fd, s, n) \ | ||||
| 	do { ssize_t r __maybe_unused = write(fd, s, n); } while (0) | ||||
| #define	spl_bt_write(fd, s)		spl_bt_write_n(fd, s, sizeof (s)) | ||||
| #define	spl_bt_write(fd, s)		spl_bt_write_n(fd, s, sizeof (s)-1) | ||||
| 
 | ||||
| #if defined(HAVE_LIBUNWIND) | ||||
| #define	UNW_LOCAL_ONLY | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Rob Norris
						Rob Norris