xres/xkb/xvmc/modesetting: Fix incorrect pointer data size usage
* xled change tested with `xset led named "Scroll Lock"` * modesetting change tested with `xrandr --output DP-1 --gamma 0.5:0.5:0.5`. Without this fix that command does nothing * xvmc change tested with `mpv --vo=xv video.mp4` Of the currently reported issues this fixes #104 Signed-off-by: dec05eba <dec05eba@protonmail.com>
This commit is contained in:
parent
fea8b78358
commit
f397039d65
|
@ -341,7 +341,7 @@ ProcXResQueryClientResources(ClientPtr client)
|
||||||
free(counts);
|
free(counts);
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xXResQueryClientResourcesReply), &rep);
|
WriteToClient(client, sizeof(xXResQueryClientResourcesReply), &rep);
|
||||||
WriteToClient(client, sizeof(scratch), scratch);
|
WriteToClient(client, num_types * sizeof(xXResType), scratch);
|
||||||
free(scratch);
|
free(scratch);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -594,7 +594,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.num = num,
|
.num = num,
|
||||||
.length = bytes_to_int32(sizeof(info)),
|
.length = bytes_to_int32(num * sizeof(xvImageFormatInfo)),
|
||||||
};
|
};
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), &rep);
|
WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), &rep);
|
||||||
|
|
|
@ -1927,7 +1927,7 @@ drmmode_set_gamma_lut(drmmode_crtc_private_ptr drmmode_crtc,
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t blob_id;
|
uint32_t blob_id;
|
||||||
if (drmModeCreatePropertyBlob(drmmode->fd, lut, sizeof(lut), &blob_id)) {
|
if (drmModeCreatePropertyBlob(drmmode->fd, lut, size * sizeof(struct drm_color_lut), &blob_id)) {
|
||||||
free(lut);
|
free(lut);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -806,7 +806,7 @@ XkbFlushLedEvents(DeviceIntPtr dev,
|
||||||
XkbDDXUpdateDeviceIndicators(dev, sli, sli->effectiveState);
|
XkbDDXUpdateDeviceIndicators(dev, sli, sli->effectiveState);
|
||||||
XkbSendExtensionDeviceNotify(dev, cause->client, ed);
|
XkbSendExtensionDeviceNotify(dev, cause->client, ed);
|
||||||
}
|
}
|
||||||
memset((char *) ed, 0, sizeof(XkbExtensionDeviceNotify));
|
memset((char *) ed, 0, sizeof(xkbExtensionDeviceNotify));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue