diff options
author | Peter Wemm <peter@FreeBSD.org> | 2018-05-08 03:44:38 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2018-05-08 03:44:38 +0000 |
commit | 3faf8d6bffc5d0fb2525ba37bb504c53366caf9d (patch) | |
tree | 7e47911263e75034b767fe34b2f8d3d17e91f66d /subversion/libsvn_fs_fs/id.c | |
parent | a55fb3c0d5eca7d887798125d5b95942b1f01d4b (diff) |
Diffstat (limited to 'subversion/libsvn_fs_fs/id.c')
-rw-r--r-- | subversion/libsvn_fs_fs/id.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/subversion/libsvn_fs_fs/id.c b/subversion/libsvn_fs_fs/id.c index bd505e06cbbc7..d22b8f7763596 100644 --- a/subversion/libsvn_fs_fs/id.c +++ b/subversion/libsvn_fs_fs/id.c @@ -82,9 +82,11 @@ locale_independent_strtol(long *result_p, next = result * 10 + c; - /* Overflow check. In case of an overflow, NEXT is 0..9. - * In the non-overflow case, RESULT is either >= 10 or RESULT and NEXT - * are both 0. */ + /* Overflow check. In case of an overflow, NEXT is 0..9 and RESULT + * is much larger than 10. We will then return FALSE. + * + * In the non-overflow case, NEXT is >= 10 * RESULT but never smaller. + * We will continue the loop in that case. */ if (next < result) return FALSE; @@ -610,7 +612,9 @@ svn_fs_fs__id_serialize(svn_temp_serializer__context_t *context, if (id == NULL) return; - /* serialize the id data struct itself */ + /* Serialize the id data struct itself. + * Note that the structure behind IN is actually larger than a mere + * svn_fs_id_t . */ svn_temp_serializer__add_leaf(context, (const void * const *)in, sizeof(fs_fs__id_t)); |