This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix segfault in filehandle duplication
[perl5.git] / hv_func.h
index 7678807..b2bde90 100644 (file)
--- a/hv_func.h
+++ b/hv_func.h
@@ -472,6 +472,16 @@ S_perl_hash_sdbm(const unsigned char * const seed, const unsigned char *str, con
     return hash;
 }
 
+/* - ONE_AT_A_TIME_HARD is the 5.17+ recommend ONE_AT_A_TIME algorithm
+ * - ONE_AT_A_TIME_OLD is the unmodified 5.16 and older algorithm
+ * - ONE_AT_A_TIME is a 5.17+ tweak of ONE_AT_A_TIME_OLD to
+ *   prevent strings of only \0 but different lengths from colliding
+ *
+ * Security-wise, from best to worst,
+ * ONE_AT_A_TIME_HARD > ONE_AT_A_TIME > ONE_AT_A_TIME_OLD
+ * There is a big drop-off in security between ONE_AT_A_TIME_HARD and
+ * ONE_AT_A_TIME
+ * */
 
 /* This is the "One-at-a-Time" algorithm by Bob Jenkins
  * from requirements by Colin Plumb.