Commit ee9b9d4c6b4948c02a8e4510aef0a24eea2d40d8
Fix possible (?) integer overflow
Try to make coverity happy, this diagnostic doesn't seem to be
realistic (it assumes that q - p = 9223372036854775807).
Author: xaizek
Author date (UTC): 2016-07-15 18:19
Committer name: xaizek
Committer date (UTC): 2016-07-15 18:19
Parent(s): d075847c1ed4c7ce21dd22d97b3274f3a58d99ce
Signing key: 99DC5E4DB05F6BE2
Tree: a1a975f86ec043f59884da04b38cb57cb9ba27c0
| File src/int/path_env.c changed (mode: 100644) (index 3ab7ae695..6d882e8ec) | 
	| ... | ... | split_path_list(void) | 
	| 196 | 196 | q = p + strlen(p); | q = p + strlen(p); | 
	| 197 | 197 | } | } | 
	| 198 | 198 |  |  | 
	| 199 |  | s = malloc(q - p + 1); |  | 
	|  | 199 |  | s = malloc(q - p + 1U); | 
	| 200 | 200 | if(s == NULL) | if(s == NULL) | 
	| 201 | 201 | { | { | 
	| 202 | 202 | free_string_array(paths, i - 1); | free_string_array(paths, i - 1); | 
|  | 
	| ... | ... | split_path_list(void) | 
	| 204 | 204 | paths_count = 0; | paths_count = 0; | 
	| 205 | 205 | return; | return; | 
	| 206 | 206 | } | } | 
	| 207 |  | snprintf(s, q - p + 1, "%s", p); |  | 
	|  | 207 |  | copy_str(s, q - p + 1U, p); | 
	| 208 | 208 |  |  | 
	| 209 | 209 | p = q; | p = q; | 
	| 210 | 210 |  |  |