← All tasks
cppmlpack/mlpack #3724Not a task: not reproduced

[R] Switch `sprintf` to `snprintf`

envgap__mlpack__mlpack-3724

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
6098192ee29d90be0824fa6be8bc044a942bcb15
Manifest
src/mlpack/bindings/R/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

mlpack/mlpack #3724 · read the original issue
From @rcurtin regarding the 4.4.0 R build on matrix, we have R CMD check returning: 



```

* checking compiled code ... WARNING

File ‘mlpack/libs/mlpack.so’:

  Found ‘__sprintf_chk’, possibly from ‘sprintf’ (C)

    Object: ‘image_converter.o’

```



The quick fix here is to switch `sprintf()` use cases to `snprintf()` in the offending `stb_image_write.h` library to ensure a maximum number of bytes to be used in the buffer declared.



/cc @eddelbuettel 
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]