ac182d7
diff -up hplip-3.23.3/protocol/hp_ipp.c.snprintf-format hplip-3.23.3/protocol/hp_ipp.c
ac182d7
--- hplip-3.23.3/protocol/hp_ipp.c.snprintf-format	2023-03-28 09:26:11.000000000 +0200
ac182d7
+++ hplip-3.23.3/protocol/hp_ipp.c	2023-05-29 14:21:30.872871575 +0200
ac182d7
@@ -108,10 +108,10 @@ int addCupsPrinter(char *name, char *dev
ac182d7
         goto abort;
ac182d7
     }
cfce1c8
 
ac182d7
-     if ( info == NULL )
cfce1c8
-        snprintf( info,sizeof(info), name );
ac182d7
+    if ( info == NULL )
cfce1c8
+        info = name;
cfce1c8
 
ac182d7
-    sprintf(printer_uri, "ipp://localhost/printers/%s", name);
ac182d7
+    snprintf( printer_uri, sizeof(printer_uri), "ipp://localhost/printers/%s", name);
cfce1c8
 
ac182d7
     cupsSetUser("root");
ac182d7
     /* Connect to the HTTP server */
ac182d7
@@ -514,27 +514,27 @@ int __parsePrinterAttributes(ipp_t *resp
cfce1c8
 
cfce1c8
              if ( strcmp(attr_name, "printer-name") == 0 &&
cfce1c8
                                         val_tag == IPP_TAG_NAME ) {
cfce1c8
-                  snprintf(t_printer->name, sizeof(t_printer->name),ippGetString(attr, 0, NULL) );
cfce1c8
+                  snprintf(t_printer->name, sizeof(t_printer->name), "%s", ippGetString(attr, 0, NULL));
cfce1c8
              }
cfce1c8
              else if ( strcmp(attr_name, "device-uri") == 0 &&
cfce1c8
                                          val_tag == IPP_TAG_URI ) {
cfce1c8
-                  snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), ippGetString(attr, 0, NULL) );
cfce1c8
+                  snprintf(t_printer->device_uri, sizeof(t_printer->device_uri), "%s", ippGetString(attr, 0, NULL));
cfce1c8
              }
cfce1c8
              else if ( strcmp(attr_name, "printer-uri-supported") == 0 &&
cfce1c8
                                                  val_tag == IPP_TAG_URI ) {
cfce1c8
-                  snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), ippGetString(attr, 0, NULL) );
cfce1c8
+                  snprintf(t_printer->printer_uri, sizeof(t_printer->printer_uri), "%s", ippGetString(attr, 0, NULL));
cfce1c8
              }
cfce1c8
              else if ( strcmp(attr_name, "printer-info") == 0 &&
cfce1c8
                                         val_tag == IPP_TAG_TEXT ) {
cfce1c8
-                  snprintf(t_printer->info,sizeof(t_printer->info), ippGetString(attr, 0, NULL) );
cfce1c8
+                  snprintf(t_printer->info, sizeof(t_printer->info), "%s", ippGetString(attr, 0, NULL));
cfce1c8
              }
cfce1c8
              else if ( strcmp(attr_name, "printer-location") == 0 &&
cfce1c8
                                            val_tag == IPP_TAG_TEXT ) {
cfce1c8
-                  snprintf(t_printer->location,sizeof(t_printer->location),ippGetString(attr, 0, NULL) );
cfce1c8
+                  snprintf(t_printer->location, sizeof(t_printer->location), "%s", ippGetString(attr, 0, NULL));
cfce1c8
              }
cfce1c8
              else if ( strcmp(attr_name, "printer-make-and-model") == 0 &&
cfce1c8
                                                   val_tag == IPP_TAG_TEXT ) {
cfce1c8
-                  snprintf(t_printer->make_model,sizeof(t_printer->make_model),ippGetString(attr, 0, NULL) );
cfce1c8
+                  snprintf(t_printer->make_model, sizeof(t_printer->make_model), "%s", ippGetString(attr, 0, NULL));
cfce1c8
              } 
cfce1c8
              else if ( strcmp(attr_name, "printer-state") == 0 &&
cfce1c8
                                              val_tag == IPP_TAG_ENUM ) {