| 2293 | } |
| 2294 | |
| 2295 | static cbm_git_bytes_t gfb_concat(CBMArena *arena,cbm_git_bytes_t a,cbm_git_bytes_t b) { |
| 2296 | if(a.length>SIZE_MAX-b.length)return (cbm_git_bytes_t){NULL,0}; |
| 2297 | size_t size=a.length+b.length;unsigned char *bytes=cbm_arena_alloc(arena,size?size:1); |
| 2298 | if(!bytes)return (cbm_git_bytes_t){NULL,0}; |
| 2299 | if(a.length)memcpy(bytes,a.data,a.length); |
| 2300 | if(b.length)memcpy(bytes+a.length,b.data,b.length); |
| 2301 | return (cbm_git_bytes_t){bytes,size}; |
| 2302 | } |
| 2303 | |
| 2304 | static bool gfb_capture_error(cbm_git_bytes_t capture,size_t width,const char *const *oids, |
| 2305 | const size_t *sizes,size_t count,bool payload, |
no test coverage detected