| 348 | } |
| 349 | |
| 350 | static char *application_text_copy(const uint8_t *bytes, uint32_t length) { |
| 351 | if (!bytes || length == 0 || memchr(bytes, '\0', length) != NULL) { |
| 352 | return NULL; |
| 353 | } |
| 354 | char *copy = malloc((size_t)length + 1U); |
| 355 | if (copy) { |
| 356 | memcpy(copy, bytes, length); |
| 357 | copy[length] = '\0'; |
| 358 | } |
| 359 | return copy; |
| 360 | } |
| 361 | |
| 362 | static bool application_regular_db_exists(const char *project) { |
| 363 | const char *cache = cbm_resolve_cache_dir(); |
no outgoing calls
no test coverage detected