Thomas Kolb
1bcc672503
This should eliminate all bufferoverflows introduced by the previous usage of strcat() and various assumptions.
23 lines
616 B
C
23 lines
616 B
C
/*
|
|
* vim: sw=2 ts=2 expandtab
|
|
*
|
|
* "THE PIZZA-WARE LICENSE" (derived from "THE BEER-WARE LICENCE"):
|
|
* Thomas Kolb <cfr34k@tkolb.de> wrote this file. As long as you retain this
|
|
* notice you can do whatever you want with this stuff. If we meet some day,
|
|
* and you think this stuff is worth it, you can buy me a pizza in return.
|
|
* - Thomas Kolb
|
|
*/
|
|
|
|
#ifndef UTIL_H
|
|
#define UTIL_H
|
|
|
|
#ifndef MAX
|
|
#define MAX(a, b) ((a > b) ? a : b)
|
|
#endif
|
|
|
|
void remove_trailing_slash(char *str);
|
|
void urlencode(const char *str, char *result);
|
|
char* safe_append(char *target, size_t *targetsize, const char *src);
|
|
|
|
#endif // UTIL_H
|