<commit_before>#
# [file:#lines]
# desc
#

[zookd.c:1612]
description goes here. for example, the 'buf' variable can be
overwritten by the 'msg' variable because ...

    <paste offending line(s) of code here>

[http.c:1512]
another description.

    <paste offending line(s) of code here>

# many more come here<commit_msg>exercise 1, find some buffer overflows<commit_after>#
# [file:#lines]
# desc
#
[http.c:159]
url_decode will copy value from sp to value, while sp is a pointer in buf,
which is of size 8192, and value is sizeof 512. So value may be 
overflowed.

    url_decode(value, sp);

[http.c:165]
sprintf copies buf into envvar, while buf is larger than envvar in size.
This may cause an overflow.

    sprintf(envvar, "HTTP_%s", buf);

[http.c:282]
The strcat may corrupt the stack, because size of 'name' may be larger 
than that of 'pn'.

    strcat(pn, name);

[http.c:94]
sprintf can corrupt envp and thus corrupt env.

    envp += sprintf(envp, "REQUEST_METHOD=%s", buf) + 1;

[zookd.c:105]
url_decode called in http_request_line may corrupt reqpath.

    url_decode(reqpath, sp1);
{'fraction_non_alphanumeric': 0.10727272727272727, 'fraction_numerical': 0.02909090909090909, 'mean_word_length': 4.0504587155963305, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7329183', 'n_tokens_mistral': 407, 'n_tokens_neox': 373, 'n_words': 145}