hplip 3.22.6 cannot be compiled when -Werror=format-security is used for compilation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
New
|
Undecided
|
Unassigned |
Bug Description
Hi all,
the new version 3.22.6 fails to build from source due compilation errors:
8565 protocol/
8566 113 | snprintf( info,sizeof(info), name );
8567 | ^~~~~~~~
8576 protocol/
8577 514 | snprintf(
8578 | ^~~~~~~~
8579 protocol/
8580 518 | snprintf(
8581 | ^~~~~~~~
8582 protocol/
8583 522 | snprintf(
8584 | ^~~~~~~~
8585 protocol/
8586 526 | snprintf(
8587 | ^~~~~~~~
8588 protocol/
8589 530 | snprintf(
8590 | ^~~~~~~~
8591 protocol/
8592 534 | snprintf(
8593 | ^~~~~~~~
If an input variable is passed into snprintf(), the function expects an argument defining the format how is the string printed into output variable.
The patch is attached, it contains one more fix (we cannot snprintf into NULL variable...)
Would you mind adding it into the project?