Control: Forwarded -1 https://sourceforge.net/p/cmph/git/merge-requests/3/ Control: tags -1 +patch
Dear Alexandre, I located the reason of the crash (a modulo 0), created a patch for the 2.0 version and made a merge request to upstream (see https://sourceforge.net/p/cmph/git/merge-requests/3/). Please find the quilt patch attached. This patch will be available with the version 2.0-1 of cmph (that I'll normally upload to mentors this week-end). Don't hesitate if you have any remark. Best regards, Joseph
Description: Prevents cmph from crashing when getting wierd file names. For more information, see #715745 Forwarded: http://sourceforge.net/p/cmph/git/merge-requests/3/ Author: Joseph HERLANT <herla...@gmail.com> Last-Update: 2014-03-07 --- a/src/jenkins_hash.c +++ b/src/jenkins_hash.c @@ -89,7 +89,10 @@ jenkins_state_t *state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t)); if (!state) return NULL; DEBUGP("Initializing jenkins hash\n"); - state->seed = ((cmph_uint32)rand() % size); + if(size > 0) + state->seed = ((cmph_uint32)rand() % size); + else + state->seed = 0; return state; } void jenkins_state_destroy(jenkins_state_t *state)