author | Lars Hjemli <hjemli@gmail.com> | 2008-09-14 07:45:37 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-09-15 20:33:11 (UTC) |
commit | a8305a9543969206aa7cec03948c5a19950eedb9 (patch) (unidiff) | |
tree | 8e2cf67ec72bc296b76a4fcb6db5ec8250f0a502 /cgit.h | |
parent | b28765135dd6f52635977454eaf95d0e6c7e7271 (diff) | |
download | cgit-a8305a9543969206aa7cec03948c5a19950eedb9.zip cgit-a8305a9543969206aa7cec03948c5a19950eedb9.tar.gz cgit-a8305a9543969206aa7cec03948c5a19950eedb9.tar.bz2 |
parsing.c: be prepared for unexpected content in commit/tag objects
When parsing commits and tags cgit made too many assumptions about the
formatting of said objects. This patch tries to make the code be more
prepared to handle 'malformed' objects.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -76,25 +76,25 @@ struct commitinfo { | |||
76 | unsigned long author_date; | 76 | unsigned long author_date; |
77 | char *committer; | 77 | char *committer; |
78 | char *committer_email; | 78 | char *committer_email; |
79 | unsigned long committer_date; | 79 | unsigned long committer_date; |
80 | char *subject; | 80 | char *subject; |
81 | char *msg; | 81 | char *msg; |
82 | char *msg_encoding; | 82 | char *msg_encoding; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | struct taginfo { | 85 | struct taginfo { |
86 | char *tagger; | 86 | char *tagger; |
87 | char *tagger_email; | 87 | char *tagger_email; |
88 | int tagger_date; | 88 | unsigned long tagger_date; |
89 | char *msg; | 89 | char *msg; |
90 | }; | 90 | }; |
91 | 91 | ||
92 | struct refinfo { | 92 | struct refinfo { |
93 | const char *refname; | 93 | const char *refname; |
94 | struct object *object; | 94 | struct object *object; |
95 | union { | 95 | union { |
96 | struct taginfo *tag; | 96 | struct taginfo *tag; |
97 | struct commitinfo *commit; | 97 | struct commitinfo *commit; |
98 | }; | 98 | }; |
99 | }; | 99 | }; |
100 | 100 | ||