summaryrefslogtreecommitdiff
path: root/tests/diff/binary.c
diff options
context:
space:
mode:
authorAnurag Gupta <anugupta@microsoft.com>2014-05-06 13:33:47 -0700
committerAnurag Gupta <anugupta@microsoft.com>2014-05-06 13:41:07 -0700
commit0bf5430dc77c69d2b2d27a771b584b17cedb97ec (patch)
treee81c712e697d9260440ec5e2f39319b8ff14b673 /tests/diff/binary.c
parent001befcdd5a208a046e0196e3fec7b16041cfe14 (diff)
downloadlibgit2-0bf5430dc77c69d2b2d27a771b584b17cedb97ec.tar.gz
Fix the issues in git_shutdown
1) Call to git_shutdown results in setting git__n_shutdown_callbacks to -1. Next call to git__on_shutdown results in ABW (Array Bound Write) for array git__shutdown_callbacks. In the current Implementation, git_atomic_dec is called git__n_shutdown_callbacks + 1 times. I have modified it to a for loop so that it is more readable. It would not set git__n_shutdown_callbacks to a negative number and reset the elements of git__shutdown_callbacks to NULL. 2) In function git_sysdir_get, shutdown function is registered only if git_sysdir__dirs_shutdown_set is set to 0. However, after this variable is set to 1, it is never reset to 0. If git_sysdir_global_init is called again from synchronized_threads_init it does not register shutdown function for this subsystem.
Diffstat (limited to 'tests/diff/binary.c')
0 files changed, 0 insertions, 0 deletions