* Don't allow control chars except spaces: we only use this for stuff * from subdaemons, who shouldn't do that. */
| 263 | * from subdaemons, who shouldn't do that. |
| 264 | */ |
| 265 | char *fromwire_wirestring(const tal_t *ctx, const u8 **cursor, size_t *max) |
| 266 | { |
| 267 | size_t i; |
| 268 | |
| 269 | for (i = 0; i < *max; i++) { |
| 270 | if ((*cursor)[i] == '\0') { |
| 271 | char *str = tal_arr(ctx, char, i + 1); |
| 272 | fromwire(cursor, max, str, i + 1); |
| 273 | return str; |
| 274 | } |
| 275 | if ((*cursor)[i] < ' ') |
| 276 | break; |
| 277 | } |
| 278 | return fromwire_fail(cursor, max); |
| 279 | } |
| 280 | |
| 281 | void fromwire_siphash_seed(const u8 **cursor, size_t *max, |
| 282 | struct siphash_seed *seed) |
no test coverage detected