| 2158 | } |
| 2159 | |
| 2160 | static bool application_update_version_valid(const char *version) { |
| 2161 | if (!version || !version[0] || strlen(version) >= APPLICATION_UPDATE_VERSION_CAP) { |
| 2162 | return false; |
| 2163 | } |
| 2164 | for (const unsigned char *cursor = (const unsigned char *)version; *cursor; cursor++) { |
| 2165 | if (!(isalnum(*cursor) || *cursor == '.' || *cursor == '-' || *cursor == '_' || |
| 2166 | *cursor == '+')) { |
| 2167 | return false; |
| 2168 | } |
| 2169 | } |
| 2170 | return true; |
| 2171 | } |
| 2172 | |
| 2173 | static void application_update_publish_terminal_locked(cbm_daemon_application_t *application, |
| 2174 | const char *latest_version, |
no outgoing calls
no test coverage detected