Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH1123: sort dir before rehash #1127

Closed
wants to merge 1 commit into from
Closed

GH1123: sort dir before rehash #1127

wants to merge 1 commit into from

Conversation

richsalz
Copy link
Contributor

This is needed to generate stable output names/symlinks.

@richsalz
Copy link
Contributor Author

Replaces #1123

@sebastianas
Copy link
Contributor

sebastianas commented May 25, 2016

Thanks. scandir(, , , alphasort) would do the same job but then looking at the wrapper your have I am not sure if this makes it any simpler.

I tried to figure out where OPENSSL_DIR_read() is comming from but I failed. However I still think that you need OPENSSL_DIR_end(&d); and sk_OPENSSL_STRING_pop_free(files, str_free); in line 300:

+        if ((copy = strdup(filename)) == NULL
+              || sk_OPENSSL_STRING_push(files, copy) == 0) {
+            BIO_puts(bio_err, "out of memory\n");

☝️

+           return 1;
+        }

and looking up we would leak the buf memory or we don't care because it is an application that terminates soon anyway?

This is needed to generate stable output names/symlinks.
@richsalz
Copy link
Contributor Author

Thanks. I changed them to call exit. No point in proceeding when malloc fails.

@mattcaswell mattcaswell added this to the 1.1.0 milestone May 27, 2016
@richsalz
Copy link
Contributor Author

richsalz commented Jun 2, 2016

pushed at b1ffe8d

@richsalz richsalz closed this Jun 2, 2016
@richsalz richsalz deleted the gh1123 branch June 9, 2016 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants