dds_stream_extract_key: reserve space in destination before calling dds_stream_read_fixed_buffer
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
		
							parent
							
								
									e3874c3c27
								
							
						
					
					
						commit
						4a4f4e22d1
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1434,6 +1434,7 @@ uint32_t dds_stream_extract_key (dds_stream_t *is, dds_stream_t *os, const uint3
 | 
			
		|||
                  {
 | 
			
		||||
                    char *dst;
 | 
			
		||||
                    DDS_CDR_ALIGNTO (os, align);
 | 
			
		||||
                    DDS_CDR_RESIZE (os, num * align);
 | 
			
		||||
                    dst = DDS_CDR_ADDRESS(os, char);
 | 
			
		||||
                    dds_stream_read_fixed_buffer (is, dst, num, align, is->m_endian);
 | 
			
		||||
                    os->m_index += num * align;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue