daemon: before exec'ing ourselves, make sure nobody plays games with /proc/self/exe

This commit is contained in:
Lennart Poettering 2009-07-20 15:47:57 +01:00
parent 6fdd5846b2
commit a2b207e38a
2 changed files with 16 additions and 6 deletions

View file

@ -83,8 +83,10 @@ static void dump_block(const pa_sample_spec *ss, const pa_memchunk *chunk) {
case PA_SAMPLE_S24RE: {
uint8_t *u = d;
for (i = 0; i < chunk->length / pa_frame_size(ss); i++)
printf("0x%02x%02x%02xx ", *(u++), *(u++), *(u++));
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
printf("0x%02x%02x%02xx ", *u, *(u+1), *(u+2));
u += 3;
}
break;
}