- * updates a chunk (!????)
- * TODO: We should reconsider this stuff, its not really clear
- */
-static void update_chunk(chunk_t *ch, int n)
-{
- n = (n > -1 && n < (int)ch->len)? n : (int)ch->len-1;
- ch->ptr += n; ch->len -= n;
-}
-
-/**
- * Remove any malicious characters from a chunk. We are very restrictive, but
- * whe use these strings only to present it to the user.
- */
-static bool sanitize_chunk(chunk_t chunk, chunk_t *clone)
-{
- char *pos;
- bool all_printable = TRUE;
-
- *clone = chunk_clone(chunk);
-
- for (pos = clone->ptr; pos < (char*)(clone->ptr + clone->len); pos++)
- {
- if (!isprint(*pos))
- {
- *pos = '?';
- all_printable = FALSE;
- }
- }
- return all_printable;
-}
-
-/**