|
84 | 84 | // ----------- version ----------- |
85 | 85 | #define VERSION_MAJOR 0 |
86 | 86 | #define VERSION_MINOR 99 |
87 | | -#define VERSION_PATCH 95 |
88 | | -static const char global_version_string[] = "0.99.95"; |
89 | | -static const char global_version_asan_string[] = "0.99.95-ASAN"; |
| 87 | +#define VERSION_PATCH 96 |
| 88 | +static const char global_version_string[] = "0.99.96"; |
| 89 | +static const char global_version_asan_string[] = "0.99.96-ASAN"; |
90 | 90 | // ----------- version ----------- |
91 | 91 | // ----------- version ----------- |
92 | 92 |
|
@@ -3128,6 +3128,21 @@ int add_tcp_relay_single(Tox *tox, const char *ip, uint16_t port, const char *ke |
3128 | 3128 | int Java_com_zoffcc_applications_trifa_MainActivity_add_1tcp_1relay_1single__real(JNIEnv *env, jobject thiz, jstring ip, |
3129 | 3129 | jstring key_hex, long port) |
3130 | 3130 | { |
| 3131 | + if (ip == NULL) |
| 3132 | + { |
| 3133 | + return 1; |
| 3134 | + } |
| 3135 | + |
| 3136 | + if (key_hex == NULL) |
| 3137 | + { |
| 3138 | + return 1; |
| 3139 | + } |
| 3140 | + |
| 3141 | + if (tox_global == NULL) |
| 3142 | + { |
| 3143 | + return 1; |
| 3144 | + } |
| 3145 | + |
3131 | 3146 | // dbg(9, "add_tcp_relay_single1"); |
3132 | 3147 | const char *key_hex_str = NULL; |
3133 | 3148 | const char *ip_str = NULL; |
@@ -3202,6 +3217,21 @@ int Java_com_zoffcc_applications_trifa_MainActivity_bootstrap_1single__real(JNIE |
3202 | 3217 | jobject key_hex, long port) |
3203 | 3218 | { |
3204 | 3219 | // dbg(9, "bootstrap_single"); |
| 3220 | + if (ip == NULL) |
| 3221 | + { |
| 3222 | + return 1; |
| 3223 | + } |
| 3224 | + |
| 3225 | + if (key_hex == NULL) |
| 3226 | + { |
| 3227 | + return 1; |
| 3228 | + } |
| 3229 | + |
| 3230 | + if (tox_global == NULL) |
| 3231 | + { |
| 3232 | + return 1; |
| 3233 | + } |
| 3234 | + |
3205 | 3235 | const char *ip_str = (*env)->GetStringUTFChars(env, ip, NULL); |
3206 | 3236 | const char *key_hex_str = (*env)->GetStringUTFChars(env, key_hex, NULL); |
3207 | 3237 | int res = bootstrap_single(tox_global, ip_str, (uint16_t)port, key_hex_str); |
|
0 commit comments