@@ -137,37 +137,37 @@ struct RecordExtHTTP : public RecordExt {
137137 uint32_t total_length = 0 ;
138138
139139 length = strlen (user_agent);
140- if (uint32_t (length + 1 ) > (uint32_t ) size) {
140+ if (( uint32_t ) (length + 3 ) > (uint32_t ) size) {
141141 return -1 ;
142142 }
143143 total_length += variable2ipfix_buffer (buffer + total_length, (uint8_t *) user_agent, length);
144144
145145 length = strlen (method);
146- if (total_length + length + 3 > (uint32_t )size) {
146+ if (total_length + length + 3 > (uint32_t ) size) {
147147 return -1 ;
148148 }
149149 total_length += variable2ipfix_buffer (buffer + total_length, (uint8_t *) method, length);
150150
151151 length = strlen (host);
152- if (total_length + length + 3 > (uint32_t )size) {
152+ if (total_length + length + 3 > (uint32_t ) size) {
153153 return -1 ;
154154 }
155155 total_length += variable2ipfix_buffer (buffer + total_length, (uint8_t *) host, length);
156156
157157 length = strlen (referer);
158- if (total_length + length + 3 > (uint32_t )size) {
158+ if (total_length + length + 3 > (uint32_t ) size) {
159159 return -1 ;
160160 }
161161 total_length += variable2ipfix_buffer (buffer + total_length, (uint8_t *) referer, length);
162162
163163 length = strlen (uri);
164- if (total_length + length + 4 > (uint32_t )size) {
164+ if (total_length + length + 3 > (uint32_t ) size) {
165165 return -1 ;
166166 }
167167 total_length += variable2ipfix_buffer (buffer + total_length, (uint8_t *) uri, length);
168168
169169 length = strlen (content_type);
170- if (total_length + length + 3 > (uint32_t )size) {
170+ if (total_length + length + 3 > (uint32_t ) size) {
171171 return -1 ;
172172 }
173173 total_length += variable2ipfix_buffer (buffer + total_length, (uint8_t *) content_type, length);
0 commit comments