Bug 246357 - sysutils/cciss_vol_status: Patch to fix &&/&-incorrect usage and a 1-byte buffer overrun
Summary: sysutils/cciss_vol_status: Patch to fix &&/&-incorrect usage and a 1-byte buf...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Muhammad Moinur Rahman
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2020-05-10 12:53 UTC by Peter Eriksson
Modified: 2020-06-23 19:10 UTC (History)
2 users (show)

See Also:
fw: maintainer-feedback+


Attachments
Patch to fix a number of bugs in cciss_vol_status 1.12 (819 bytes, text/plain)
2020-05-10 12:53 UTC, Peter Eriksson
no flags Details
Version 2 of patch to fix &&/& and writing outside an array (2.75 KB, patch)
2020-05-10 13:03 UTC, Peter Eriksson
no flags Details | Diff
v3 of ports patch for cciss_vol_status (5.64 KB, patch)
2020-06-19 15:30 UTC, Peter Eriksson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eriksson 2020-05-10 12:53:45 UTC
Created attachment 214348 [details]
Patch to fix a number of bugs in cciss_vol_status 1.12

Please find enclosed a simple patch that fixes a number of bugs in cciss_vol_status 1.12:

1. Incorrect usage of "&&" (logical-AND) that should be "&" (bitwise-AND).
2. Off-by-one buffer overrun.
Comment 1 Peter Eriksson 2020-05-10 13:03:09 UTC
Created attachment 214349 [details]
Version 2 of patch to fix &&/& and writing outside an array

Also fixes a pretty-printing issue (so the output lines up nicely for big disk enclosures.
Comment 2 Frank Wall 2020-06-16 11:51:48 UTC
Since cciss_vol_status seems to have been abandoned upstream, the patch is a good way to keep it working and I appreciate it. However, I do no longer have access to compatible hardware, so I can't test it and must rely completely on the submitter's testing.

Anyway, thanks! Please commit.
Comment 3 Peter Eriksson 2020-06-19 15:30:18 UTC
Created attachment 215791 [details]
v3 of ports patch for cciss_vol_status

Updated diff that updates the included patch in the Port to fix the problems mentioned here. Also updates the port Makefile to fix a minor warning, and changes MAINTAINER to me (from discussion with the original maintainer that no longer have access to compatible hardware).