https://github.com/AndrewBelt/bored/blob/master/src/map.c#L3...
and then access it:
https://github.com/AndrewBelt/bored/blob/master/src/map.c#L4...
Here if realloc() fails, you'll have a memory leak and, again, accessing NULL later:
https://github.com/AndrewBelt/bored/blob/master/src/priq.c#L...
There is also integer overflow: alloc is int, so if it becomes greater than 2^31-1, it may wrap around [I think signed int behaviour in C is undefined in this case], and you'll allocate fewer bytes than needed, leading to buffer overflow.