flux-framework / flux-pmix

flux shell plugin to bootstrap openmpi v5+
GNU Lesser General Public License v3.0
2 stars 4 forks source link

use strlcpy instead of strncpy #53

Closed garlick closed 2 years ago

garlick commented 2 years ago

The use of strncpy() is error prone, so bring in strlcpy(). There is actually at least one place where dropping the static initializer for a pmix_info_t struct created an unsafe (though unlikely) situation.

Anyway this is better hygiene.

codecov[bot] commented 2 years ago

Codecov Report

Merging #53 (78f67fa) into main (8410dc9) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   78.45%   78.46%   +0.01%     
==========================================
  Files          10       10              
  Lines        1188     1189       +1     
==========================================
+ Hits          932      933       +1     
  Misses        256      256              
Impacted Files Coverage Δ
src/shell/plugins/codec.c 70.00% <100.00%> (ø)
src/shell/plugins/infovec.c 91.13% <100.00%> (+0.11%) :arrow_up:
src/shell/plugins/interthread.c 82.85% <100.00%> (ø)
src/shell/plugins/main.c 78.84% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8410dc9...78f67fa. Read the comment docs.

garlick commented 2 years ago

Timed out downloading mvapich - restarting.