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

Cast argument of snd_seq_dump_var_event #14

Conversation

sempervictus
Copy link

Avoids "error: passing argument 2 of ‘snd_seq_dump_var_event’
from incompatible pointer type" in
sound/core/seq/oss/seq_oss_readq.c:146:36

Avoids  "error: passing argument 2 of ‘snd_seq_dump_var_event’
from incompatible pointer type" in
sound/core/seq/oss/seq_oss_readq.c:146:36
@minipli
Copy link
Owner

minipli commented Nov 23, 2017

Sorry, but your fix is wrong. You have to adapt the signature of readq_dump_sysex() instead to avoid a RAP runtime violation.

I'll fix it up myself, no worries.

Thanks for the report!

@minipli minipli closed this Nov 23, 2017
minipli added a commit that referenced this pull request Nov 23, 2017
The second argument should be a const pointer under PaX/grsec.

This fixes the following build breakage:

 sound/core/seq/oss/seq_oss_readq.c: In function ‘snd_seq_oss_readq_sysex’:
 sound/core/seq/oss/seq_oss_readq.c:146:36: error: passing argument 2 of ‘snd_seq_dump_var_event’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   return snd_seq_dump_var_event(ev, readq_dump_sysex, &ctx);

Reported-by: sempervictus in #14
Reported-by: powerman in #15
Signed-off-by: Mathias Krause <minipli@googlemail.com>
@sempervictus
Copy link
Author

sempervictus commented Nov 23, 2017 via email

@minipli
Copy link
Owner

minipli commented Nov 24, 2017

The RAP violation will only be triggered by executing this code path. Merely compiling/linking the code does not generate errors. ... RAP is CFI after all, i.e. needs a control flow, i.e. code execution ;)

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.

2 participants