mirror of
				https://gitea.osmocom.org/cellular-infrastructure/osmo-hnodeb.git
				synced 2025-11-03 21:53:33 +00:00 
			
		
		
		
	gtp: Fix uninitialized var if no extension flags set in gtp header
The logic was plain wrong, bug introduced while typing initial code. Closes: Coverity CID#243535 Change-Id: I497667edd0571fff91ab41c8b57bdcf277e5988d
This commit is contained in:
		@@ -246,7 +246,7 @@ static int hnb_gtp_wq_read_cb(struct osmo_fd *fd)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if (hdr->s || hdr->pn || hdr->e)
 | 
						if (hdr->s || hdr->pn || hdr->e)
 | 
				
			||||||
		opt_hdr_len = 4;
 | 
							opt_hdr_len = 4;
 | 
				
			||||||
	if (hdr->pn)
 | 
						else
 | 
				
			||||||
		opt_hdr_len = 0;
 | 
							opt_hdr_len = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (msgb_length(msg) < sizeof(*hdr) + opt_hdr_len) {
 | 
						if (msgb_length(msg) < sizeof(*hdr) + opt_hdr_len) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user