* Don't allow control chars except spaces: we only use this for stuff * from subdaemons, who shouldn't do that. */
| 236 | * from subdaemons, who shouldn't do that. |
| 237 | */ |
| 238 | char *fromwire_wirestring(const tal_t *ctx, const u8 **cursor, size_t *max) |
| 239 | { |
| 240 | size_t i; |
| 241 | |
| 242 | for (i = 0; i < *max; i++) { |
| 243 | if ((*cursor)[i] == '\0') { |
| 244 | char *str = tal_arr(ctx, char, i + 1); |
| 245 | fromwire(cursor, max, str, i + 1); |
| 246 | return str; |
| 247 | } |
| 248 | if ((*cursor)[i] < ' ') |
| 249 | break; |
| 250 | } |
| 251 | return fromwire_fail(cursor, max); |
| 252 | } |
| 253 | |
| 254 | void fromwire_siphash_seed(const u8 **cursor, size_t *max, |
| 255 | struct siphash_seed *seed) |
no test coverage detected