Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed:booth fails in realocating a memory

When we set more than 17 tickets, booth causes "segmentation fault".
I add typecasting because the calculation of pointer is incorrect. 

Signed-off-by: Yuichi SEINO <seino.cluster2@gmail.com>
  • Loading branch information...
commit bb8a987dd30e67c0340a97d5cae101e8cef1fb1e 1 parent f7aea17
@seinocluster2 seinocluster2 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/config.c
View
2  src/config.c
@@ -39,7 +39,7 @@ static int ticket_realloc(void)
return -ENOMEM;
}
- p = booth_conf + sizeof(struct booth_config)
+ p = (char *) booth_conf + sizeof(struct booth_config)
+ ticket_size * sizeof(struct ticket_config);
memset(p, 0, TICKET_ALLOC * sizeof(struct ticket_config));
ticket_size += TICKET_ALLOC;
Please sign in to comment.
Something went wrong with that request. Please try again.