Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for modern Linux and add Fedora .spec file #6

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

drepper
Copy link

@drepper drepper commented Apr 13, 2021

Hello Steve,

I have no idea whether you're still interested in this. If not, let me know and I'll just carry on in my cloned repository.

I've been using a hacky build of your vxi11 for a while and only in the last days finally took the steps to update the code for a modern system and create the configuration to create RPM packages. The result works on my Fedora 33 system.

In the process I've fixed potential out-of-bound reads and string truncations.

The vxi11_open_device function keeps a list of known clients which
includes the address.  This is a string which can be an IP address
(of fixed length) but could also be host names.  Change the structure
to use a zero-length array for the address and allocate memory
according to the address string's length.
The code ignored fgets failures which might lead to undefined behavior
and potentially out-of-bound reads.  Actually return the error of the
loop as the program's exit status
Simplify argument handling in vxi11_send and in the process fix
unnecessary truncation of the command and potential out-of-bounds
read
This was missing from 'make install'
With this .spec file the package is compiled and packaged in four
different RPM files (plus the debug information).  The library,
header, utilities, and the Python code can be installed separately.
The library is a dependency for the other packages, though.

Because Fedora (and upstream) for some time has deprecated Python 2
the code is only packaged for Python 3.
Instead of using LIB_SUFFIX simply get the entire directory name from
a variable.  This matches the variable _lib in RPM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant