Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, systems without gnutls were computing auth_md5 to be twice the size of what it was defined to be, thus causing zms to crash. The for loop at line 227 builds auth_md5 by looping every "2j", which means the upper limit (md5len) should be half the desired size of auth_md5.
- Loading branch information
4e9698a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to have fixed the issue, but uh, why does it fix the issue?
4e9698a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice that auth_md5 is defined to have 32+1 elements. Now scroll down to the "for" loop at line 227. Notice that it builds auth_md5 two characters (2*j) at a time. That means we need to loop half as many times as the size of auth_md5. If we loop 32 times, instead of 16, we build an auth_md5 with 64+1 elements, which exceeds what we defined earlier and causes the fault.
4e9698a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - you rock! Getting close to a stable release eh?
4e9698a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad you took the time to organize this on github. I don't know how often you check the forum, but a couple people have posted their thanks for breathing new life into zoneminder. We are definitely making progress, but I'm not sure if this has been tested on Gentoo yet. Also, bleeding edge distros like Fedora might have unique compilation issues with their newer kernel and/or this thing called systemd, which I don't yet know anything about. I know a couple have tried to compile this on Fedora, but I have not seen any reports of success yet. May have to try it myself.