File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6545,10 +6545,10 @@ mark_desktop_file_trusted (CommonJob *common,
65456545 }
65466546
65476547 if (!g_str_has_prefix (contents , "#!" )) {
6548- new_length = length + strlen (TRUSTED_SHEBANG );
6549- new_contents = g_malloc (new_length );
6548+ new_length = length + strlen (TRUSTED_SHEBANG ) + 1 ;
6549+ new_contents = g_malloc0 (new_length );
65506550
6551- strcpy (new_contents , TRUSTED_SHEBANG );
6551+ g_strlcpy (new_contents , TRUSTED_SHEBANG , new_length );
65526552 memcpy (new_contents + strlen (TRUSTED_SHEBANG ),
65536553 contents , length );
65546554
Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ override_title_font (GtkWidget *widget,
433433 g_strreverse (tempsize );
434434
435435 gchar tempfont [strlen (font )];
436- strcpy (tempfont , font );
436+ g_strlcpy (tempfont , font , sizeof ( tempfont ) );
437437 tempfont [strlen (font ) - strlen (tempsize )] = 0 ;
438438
439439 css = g_strdup_printf ("label { font-family: %s; font-size: %spt; }" , tempfont , tempsize );
You can’t perform that action at this time.
0 commit comments