Mageia Bugzilla – Attachment 10407 Details for
Bug 23665
glib2.0 new security issues CVE-2018-16428 and CVE-2018-16429
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Test script for CVE-2018-16429
test2.c (text/x-csrc), 904 bytes, created by
Len Lawrence
on 2018-10-17 16:33:21 CEST
(
hide
)
Description:
Test script for CVE-2018-16429
Filename:
MIME Type:
Creator:
Len Lawrence
Created:
2018-10-17 16:33:21 CEST
Size:
904 bytes
patch
obsolete
>#include <stdio.h> >#include <string.h> >#include <glib.h> >#include <stdlib.h> > > >int main(int argc, void* argv[]) >{ > > GMarkupParser *parser; > GMarkupParseContext *context; > GError *error = NULL; > FILE* fd; > > if(argc < 2) { > printf("input file path needed\n"); > return 0; > } > fd = fopen(argv[1], "r"); > if (fd == NULL){ > printf("open file failed\n"); > return -1; > } > char *input = (char*) malloc(16); > fread(input, 16, 1, fd); > > parser= g_new0 (GMarkupParser, 1); > context = g_markup_parse_context_new (parser, G_MARKUP_TREAT_CDATA_AS_TEXT, 0, 0); > > g_markup_parse_context_parse (context, (const gchar *)input, 16, &error); > g_markup_parse_context_free (context); > > if (error != NULL){ > g_error_free (error); > g_free (parser); > printf("Error: %s\n", g_strdup (error->message)); > } > > free(input); > > > return 0; >}
#include <stdio.h> #include <string.h> #include <glib.h> #include <stdlib.h> int main(int argc, void* argv[]) { GMarkupParser *parser; GMarkupParseContext *context; GError *error = NULL; FILE* fd; if(argc < 2) { printf("input file path needed\n"); return 0; } fd = fopen(argv[1], "r"); if (fd == NULL){ printf("open file failed\n"); return -1; } char *input = (char*) malloc(16); fread(input, 16, 1, fd); parser= g_new0 (GMarkupParser, 1); context = g_markup_parse_context_new (parser, G_MARKUP_TREAT_CDATA_AS_TEXT, 0, 0); g_markup_parse_context_parse (context, (const gchar *)input, 16, &error); g_markup_parse_context_free (context); if (error != NULL){ g_error_free (error); g_free (parser); printf("Error: %s\n", g_strdup (error->message)); } free(input); return 0; }
View Attachment As Raw
Actions:
View
Attachments on
bug 23665
:
10406
| 10407 |
10408