Page MenuHomePhabricator

[CommCoreModule] capture primitive parameter by value
ClosedPublic

Authored by kamil on Sep 14 2023, 1:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 5, 10:21 PM
Unknown Object (File)
Sat, May 4, 2:37 PM
Unknown Object (File)
Fri, May 3, 3:48 PM
Unknown Object (File)
Wed, May 1, 7:30 PM
Unknown Object (File)
Apr 16 2024, 3:23 AM
Unknown Object (File)
Apr 16 2024, 3:23 AM
Unknown Object (File)
Apr 13 2024, 8:30 AM
Unknown Object (File)
Apr 13 2024, 8:30 AM
Subscribers

Details

Summary

Fixes regression introduced in D8887.

This is a solution for ENG-4926.

When the code gets to run, the outer function generateRandomString may have already returned. This means that size might have been destroyed, and there is an undefined reference. That's why this function generates backupID with length 0 and as an effect causes Argon2 to throw salt too short.

On dev everything worked, everything happens only on prod when code is more optimized.

I also added casting to the correct type.

Test Plan

Test upload protocol in Release mode.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable