Browse Source

image-source: Fix snprintf calls with literals as buffer sizes

PatTheMav 3 years ago
parent
commit
415c2d9efd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/image-source/obs-slideshow.c

+ 1 - 1
plugins/image-source/obs-slideshow.c

@@ -922,7 +922,7 @@ static obs_properties_t *ss_properties(void *data)
 		obs_property_list_add_string(p, aspects[i], aspects[i]);
 		obs_property_list_add_string(p, aspects[i], aspects[i]);
 
 
 	char str[32];
 	char str[32];
-	snprintf(str, 32, "%dx%d", cx, cy);
+	snprintf(str, sizeof(str), "%dx%d", cx, cy);
 	obs_property_list_add_string(p, str, str);
 	obs_property_list_add_string(p, str, str);
 
 
 	if (ss) {
 	if (ss) {