Skip to content

[dev] tscancode #13

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/protocolhandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ void _xcb_im_handle_query_extension(xcb_im_t *im, xcb_im_client_t *client,
const xcb_im_packet_header_fr_t *hdr,
uint8_t *data) {
xcb_im_query_extension_fr_t frame;
memset(&frame, 0, sizeof(frame));
_xcb_im_read_frame_with_error(im, client, frame, data,
XIM_MESSAGE_BYTES(hdr));

Expand Down Expand Up @@ -136,6 +137,7 @@ void _xcb_im_handle_encoding_negotiation(xcb_im_t *im, xcb_im_client_t *client,
const xcb_im_packet_header_fr_t *hdr,
uint8_t *data) {
xcb_im_encoding_negotiation_fr_t frame;
memset(&frame, 0, sizeof(frame));
_xcb_im_read_frame_with_error(im, client, frame, data,
XIM_MESSAGE_BYTES(hdr));

Expand Down
13 changes: 11 additions & 2 deletions src/xlibi18n/lcUniConv/8bit_tab_to_h.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,19 @@ int main (int argc, char *argv[])

{
char* fname = malloc(strlen(directory)+strlen(filename)+1);
strcpy(fname,directory); strcat(fname,filename);
if (fname == NULL) {
/* Memory allocation failed, handle the error */
exit(1);
}
strcpy(fname,directory);
strcat(fname,filename);
f = fopen(fname,"w");
if (f == NULL)
if (f == NULL) {
/* Failed to open file, handle the error */
free(fname); // Free the allocated memory if fopen fails
exit(1);
}
free(fname); // Add this line to free the memory allocated to fname
}

fprintf(f, "\n");
Expand Down