| 182 | } |
| 183 | |
| 184 | static bool instance_key_valid(const char *key) { |
| 185 | if (!key) { |
| 186 | return false; |
| 187 | } |
| 188 | for (size_t i = 0; i < 16; i++) { |
| 189 | char ch = key[i]; |
| 190 | bool decimal = ch >= '0' && ch <= '9'; |
| 191 | bool lower = ch >= 'a' && ch <= 'f'; |
| 192 | if (!decimal && !lower) { |
| 193 | return false; |
| 194 | } |
| 195 | } |
| 196 | return key[16] == '\0'; |
| 197 | } |
| 198 | |
| 199 | static char *string_copy(const char *value) { |
| 200 | if (!value) { |
no outgoing calls
no test coverage detected