Author: Andreas Tille <tille@debian.org>
LastChanged: Thu, 07 Nov 2013 14:44:28 +0100
Description: Fix format errors who fail to build with -Werror=format-security

--- ctn-3.2.0+dfsg.orig.orig/facilities/database/database.c
+++ ctn-3.2.0+dfsg.orig/facilities/database/database.c
@@ -865,7 +865,7 @@
     if (HF_SharedLock() != HF_NORMAL)
 	return;
 
-    printf("DB Key: %s  Number of Patients: %d Number of Additions/Deletions: %d\n\n",
+    printf("DB Key: %s  Number of Patients: %d Number of Additions/Deletions: %ld\n\n",
 	   GS_root.dbkey, GS_root.num_patients, HF_ReadUpdateFlag());
 
     for (i = 0; i < DB_MAXPATIENTS; i++) {
@@ -947,7 +947,7 @@
     printf("\t\t     Modality: %s\n", snode->series.Modality);
     printf("\t\tSeries Number: %s\n", snode->series.SeriesNumber);
     printf("\t\t   Series UID: %s\n", snode->series.SeriesUID);
-    printf("\t\t  Series Time: %d\n", snode->time_stamp);
+    printf("\t\t  Series Time: %ld\n", snode->time_stamp);
 }
 /* DB_PrintStudy
 **
@@ -981,7 +981,7 @@
     printf("\t\t          InterpretingPhysName: %s\n", snode->study.InterpretingPhysName);
     printf("\t\t          ProcedureDescription: %s\n", snode->study.ProcedureDescription);
     printf("\t\t AdmittingDiagnosedDescription: %s\n", snode->study.AdmittingDiagnosedDescription);
-    printf("\t\tStudy Time: %d\n", snode->time_stamp);
+    printf("\t\tStudy Time: %ld\n", snode->time_stamp);
 }
 /* DB_PrintPatient
 **
@@ -1007,7 +1007,7 @@
     printf("\tBirthdate: %s\n", pnode.pat.BirthDate);
     printf("\t     Name: %s\n", pnode.pat.Name);
     printf("\t    PatID: %s\n", pnode.pat.PatID);
-    printf("\t Pat Time: %d\n\n", pnode.time_stamp);
+    printf("\t Pat Time: %ld\n\n", pnode.time_stamp);
 }
 
 /* DB_PrintImage
@@ -1035,7 +1035,7 @@
     printf("\t  ImageUID: %s\n", inode.image.ImageUID);
     printf("\t Class UID: %s\n", inode.image.ClassUID);
     printf("\t  FileName: %s\n", inode.image.FileName);
-    printf("\tImage Time: %d\n\n", inode.time_stamp);
+    printf("\tImage Time: %ld\n\n", inode.time_stamp);
 }
 
 /* DB_AddSeries
--- ctn-3.2.0+dfsg.orig.orig/facilities/objects/dcm.c
+++ ctn-3.2.0+dfsg.orig/facilities/objects/dcm.c
@@ -1649,7 +1649,7 @@
 	(void) LST_Position(&(*object)->groupList, groupItem);
 
     while (groupItem != NULL) {
-#ifdef MACOS
+#if defined(MACOS) || defined(LINUX) || defined(FREEBSD)
 	printf("Group: %04x, Length: %8ld\n", groupItem->group,
 	       groupItem->baseLength);
 #else
@@ -1660,7 +1660,7 @@
 	if (elementItem != NULL)
 	    (void) LST_Position(&groupItem->elementList, elementItem);
 	while (elementItem != NULL) {
-#ifdef MACOS
+#if defined(MACOS) || defined(LINUX) || defined(FREEBSD)
 	    (void) printf("%04x %04x %8ld ",
 			  DCM_TAG_GROUP(elementItem->element.tag),
 			  DCM_TAG_ELEMENT(elementItem->element.tag),
--- ctn-3.2.0+dfsg.orig.orig/facilities/services/find.c
+++ ctn-3.2.0+dfsg.orig/facilities/services/find.c
@@ -569,7 +569,7 @@
 		(findResponse->dataSetType == DCM_CMDDATANULL)) {
 
 		if (PRVSRV_debug)
-		    fprintf(DEBUG_DEVICE, pendingNullMsg);
+		    fprintf(DEBUG_DEVICE, "%s", pendingNullMsg);
 		rtnCond = COND_PushCondition(SRV_SUSPICIOUSRESPONSE,
 		   SRV_Message(SRV_SUSPICIOUSRESPONSE), "C-FIND", "pending",
 					     "null", "SRV_CFindResponse");
@@ -578,7 +578,7 @@
 		(findResponse->dataSetType != DCM_CMDDATANULL)) {
 
 		if (PRVSRV_debug)
-		    fprintf(DEBUG_DEVICE, notPendingnotNullMsg);
+		    fprintf(DEBUG_DEVICE, "%s", notPendingnotNullMsg);
 		rtnCond = COND_PushCondition(SRV_SUSPICIOUSRESPONSE,
 			      SRV_Message(SRV_SUSPICIOUSRESPONSE), "C-FIND",
 			    "not pending", "not null", "SRV_CFindResponse");
--- ctn-3.2.0+dfsg.orig.orig/facilities/services/get.c
+++ ctn-3.2.0+dfsg.orig/facilities/services/get.c
@@ -707,7 +707,7 @@
 		(getResponse->dataSetType != DCM_CMDDATANULL)) {
 
 		if (PRVSRV_debug)
-		    fprintf(DEBUG_DEVICE, pendingMsg);
+		    fprintf(DEBUG_DEVICE, "%s", pendingMsg);
 		rtnCond = COND_PushCondition(SRV_SUSPICIOUSRESPONSE,
 			       SRV_Message(SRV_SUSPICIOUSRESPONSE), "C-GET",
 				 "pending", "not null", "SRV_CGetResponse");
--- ctn-3.2.0+dfsg.orig.orig/facilities/services/move.c
+++ ctn-3.2.0+dfsg.orig/facilities/services/move.c
@@ -577,7 +577,7 @@
 		(moveResponse->dataSetType != DCM_CMDDATANULL)) {
 
 		if (PRVSRV_debug)
-		    fprintf(DEBUG_DEVICE, pendingMsg);
+		    fprintf(DEBUG_DEVICE, "%s", pendingMsg);
 		rtnCond = COND_PushCondition(SRV_SUSPICIOUSRESPONSE,
 			      SRV_Message(SRV_SUSPICIOUSRESPONSE), "C-MOVE",
 				"pending", "not null", "SRV_CFindResponse");
--- ctn-3.2.0+dfsg.orig.orig/apps/clone_study/clone_study.c
+++ ctn-3.2.0+dfsg.orig/apps/clone_study/clone_study.c
@@ -340,7 +340,7 @@
   -r  Send study with accession number <req num>\n\
   -u  Send study with study instance UID <study UID>\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
@@ -416,7 +416,7 @@
     if (cond != IDB_NORMAL) {
 	COND_DumpConditions();
     }
-    printf("%d\n", LST_Count(&imageList));
+    printf("%ld\n", LST_Count(&imageList));
     return imageList;
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_add_fragments/dcm_add_fragments.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_add_fragments/dcm_add_fragments.c
@@ -86,7 +86,7 @@
   f1      First fragment to add \n\
   f2      Zero or more fragments to add \n";
 
-  fprintf(stderr, msg);
+  fprintf(stderr, "%s", msg);
   exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_create_object/dcm_create_object.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_create_object/dcm_create_object.c
@@ -209,7 +209,7 @@
 \n\
   fileout  Name the output file \n";
 
-    fprintf(stdout, msg);
+    fprintf(stdout, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_ctnto10/dcm_ctnto10.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_ctnto10/dcm_ctnto10.c
@@ -188,6 +188,6 @@
     -B  Big endian explicit transfer syntax\n\
     -L  Little endian explicit transfer syntax\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/image_server/test_storage.c
+++ ctn-3.2.0+dfsg.orig/apps/image_server/test_storage.c
@@ -117,6 +117,6 @@
 \n\
     file  File containing DICOM image\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/image_server/image_server.c
+++ ctn-3.2.0+dfsg.orig/apps/image_server/image_server.c
@@ -331,7 +331,7 @@
 \n\
     port  TCP/IP port address\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(5);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/image_server/fillImageDB.c
+++ ctn-3.2.0+dfsg.orig/apps/image_server/fillImageDB.c
@@ -157,7 +157,7 @@
     database The image database to be used\n\
     file     A list of one or more image files to be inserted\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/wlma_ui/wlma_ui.c
+++ ctn-3.2.0+dfsg.orig/apps/wlma_ui/wlma_ui.c
@@ -263,6 +263,6 @@
     -v  Place all facilities in verbose mode\n\
     -x  Place <facility> in verbose mode (DCM, DUL, FIS, SRV, TBL)\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/wlma_ui/wlma_ui.prj
+++ ctn-3.2.0+dfsg.orig/apps/wlma_ui/wlma_ui.prj
@@ -314,7 +314,7 @@
     -v  Place all facilities in verbose mode\n\\
     -x  Place <facility> in verbose mode (DCM, DUL, FIS, SRV, TBL)\n";\
 \
-    fprintf(stderr, msg);\
+    fprintf(stderr, "%s", msg);\
     exit(1);\
 }\
 
--- ctn-3.2.0+dfsg.orig.orig/apps/storage_commit/commit_agent.c
+++ ctn-3.2.0+dfsg.orig/apps/storage_commit/commit_agent.c
@@ -310,7 +310,7 @@
 \n\
     port  TCP/IP port address\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(5);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/storage_commit/storage_commit.c
+++ ctn-3.2.0+dfsg.orig/apps/storage_commit/storage_commit.c
@@ -241,7 +241,7 @@
 \n\
   destinationAETitle	An AE title found in the control database\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/pdu_examples/ex3_initiator.c
+++ ctn-3.2.0+dfsg.orig/apps/pdu_examples/ex3_initiator.c
@@ -266,7 +266,7 @@
     node  Node name for network connection\n\
     port  TCP / IP port number of server application\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/pdu_examples/ex3_acceptor.c
+++ ctn-3.2.0+dfsg.orig/apps/pdu_examples/ex3_acceptor.c
@@ -335,7 +335,7 @@
    -p    Dump Association RQ parameters\n\
    -v    Place DCM, DUL and SRV facilities in verbose mode\n";
 
-    (void) fprintf(stderr, msg);
+    (void) fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/pdu_examples/ex1_initiator.c
+++ ctn-3.2.0+dfsg.orig/apps/pdu_examples/ex1_initiator.c
@@ -268,7 +268,7 @@
     node  Node name for network connection\n\
     port  TCP / IP port number of server application\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/pdu_examples/ex4_initiator.c
+++ ctn-3.2.0+dfsg.orig/apps/pdu_examples/ex4_initiator.c
@@ -267,7 +267,7 @@
     node  Node name for network connection\n\
     port  TCP / IP port number of server application\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/pdu_examples/ex2_initiator.c
+++ ctn-3.2.0+dfsg.orig/apps/pdu_examples/ex2_initiator.c
@@ -263,7 +263,7 @@
     node  Node name for network connection\n\
     port  TCP / IP port number of server application\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_replace_element/dcm_replace_element.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_replace_element/dcm_replace_element.c
@@ -225,6 +225,6 @@
    <element file>  File containing data to replace element\n\
    filein fileout  Input and output files\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_verify/dcm_verify.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_verify/dcm_verify.c
@@ -822,6 +822,6 @@
 \n\
   filename    Of the image to be verified\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/query_client/patient_query.c
+++ ctn-3.2.0+dfsg.orig/apps/query_client/patient_query.c
@@ -317,7 +317,7 @@
     port         IP port number of server\n\
     query        File containing a DICOM object with the query\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/cfg_ctn_tables/cfg_ctn_tables.c
+++ ctn-3.2.0+dfsg.orig/apps/cfg_ctn_tables/cfg_ctn_tables.c
@@ -237,6 +237,6 @@
     -h   Give help page\n\
     -x   Place facility fac in verbose mode (TBL)\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/cfg_ctn_tables/cfg_ctn_tables.prj
+++ ctn-3.2.0+dfsg.orig/apps/cfg_ctn_tables/cfg_ctn_tables.prj
@@ -355,7 +355,7 @@
     -h   Give help page\n\\
     -x   Place facility fac in verbose mode (TBL)\n";\
 \
-    fprintf(stderr, msg);\
+    fprintf(stderr, "%s", msg);\
     exit(1);\
 }\
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_to_xml/dcm_to_xml.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_to_xml/dcm_to_xml.c
@@ -315,6 +315,6 @@
 \n\
     file      The information object to be converted to XML\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/send_image/send_image.c
+++ ctn-3.2.0+dfsg.orig/apps/send_image/send_image.c
@@ -735,7 +735,7 @@
     port  TCP / IP port number of server application\n\
     image A list of one or more images to send\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/pmgr_motif/pmgr_motif.prj
+++ ctn-3.2.0+dfsg.orig/apps/pmgr_motif/pmgr_motif.prj
@@ -434,7 +434,7 @@
     printerGroup The group name which identifies the set of printers\n\\
                  which will be targets for this invocation\n";\
 \
-    fprintf(stderr, msg);\
+    fprintf(stderr, "%s", msg);\
     exit(1);\
 }\
 
--- ctn-3.2.0+dfsg.orig.orig/apps/pmgr_motif/pgmr_motif.prj
+++ ctn-3.2.0+dfsg.orig/apps/pmgr_motif/pgmr_motif.prj
@@ -333,7 +333,7 @@
     printerGroup The group name which identifies the set of printers\n\\
                  which will be targets for this invocation\n";\
 \
-    fprintf(stderr, msg);\
+    fprintf(stderr, "%s", msg);\
     exit(1);\
 }\
 
--- ctn-3.2.0+dfsg.orig.orig/apps/pmgr_motif/pmgr_motif.c
+++ ctn-3.2.0+dfsg.orig/apps/pmgr_motif/pmgr_motif.c
@@ -293,6 +293,6 @@
     printerGroup The group name which identifies the set of printers\n\
                  which will be targets for this invocation\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/fillRSA/fillRSA.c
+++ ctn-3.2.0+dfsg.orig/apps/fillRSA/fillRSA.c
@@ -157,6 +157,6 @@
     -r title    Enter title as retrieve AE title at series level\n\
     -x fac      Place fac in verbose mode (TBL)\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/fillRSA/fillRSAImpInterp.c
+++ ctn-3.2.0+dfsg.orig/apps/fillRSA/fillRSAImpInterp.c
@@ -146,6 +146,6 @@
 \n\
     -x fac      Place fac in verbose mode (TBL)\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/mb_xlate_test/mb_xlate_test.c
+++ ctn-3.2.0+dfsg.orig/apps/mb_xlate_test/mb_xlate_test.c
@@ -83,7 +83,7 @@
 \n\
     file      One or more information objects to be dumped\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/load_control/load_control.c
+++ ctn-3.2.0+dfsg.orig/apps/load_control/load_control.c
@@ -84,7 +84,7 @@
 \n\
     -f    Use db as control database instead of default (CTNControl)\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dicom_echo/dicom_echo.c
+++ ctn-3.2.0+dfsg.orig/apps/dicom_echo/dicom_echo.c
@@ -345,7 +345,7 @@
     node  Node name of server\n\
     port  Port number of server\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_rm_element/dcm_rm_element.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_rm_element/dcm_rm_element.c
@@ -173,6 +173,6 @@
    group element   Tag of the element to remove\n\
    filein fileout  Input and output files\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_pixel_bits/dcm_pixel_bits.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_pixel_bits/dcm_pixel_bits.c
@@ -335,6 +335,6 @@
   output     Output file\n\
   operator   AND, OR \n\
   mask       Hexadecimal mask\n";
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_vr_patterns/dcm_vr_patterns.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_vr_patterns/dcm_vr_patterns.c
@@ -98,7 +98,7 @@
    test            0 -> 8 bit data, 1-> 16 bit data\n\
    output file     Binary DICOM file\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/mb_query/mb_query.c
+++ ctn-3.2.0+dfsg.orig/apps/mb_query/mb_query.c
@@ -625,7 +625,7 @@
     node  Node name of server\n\
     port  Port number of server\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_resize/dcm_resize.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_resize/dcm_resize.c
@@ -296,6 +296,6 @@
   -t  Read file with DICOM Part 10 file format\n\
   -v  Place DCM facility in verbose mode\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/ctn_validate_mb/ctn_validate_mb.c
+++ ctn-3.2.0+dfsg.orig/apps/ctn_validate_mb/ctn_validate_mb.c
@@ -84,7 +84,7 @@
 \n\
     file      One or more information objects to be dumped\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_to_text/dcm_to_text.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_to_text/dcm_to_text.c
@@ -313,6 +313,6 @@
 \n\
     file      The information object to be converted to text\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/ctn_cutil/ctn_cutil.c
+++ ctn-3.2.0+dfsg.orig/apps/ctn_cutil/ctn_cutil.c
@@ -83,7 +83,7 @@
               ISO2022KR\n\
               EUCKR\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/spray_image/spray_image.c
+++ ctn-3.2.0+dfsg.orig/apps/spray_image/spray_image.c
@@ -957,7 +957,7 @@
     port  TCP / IP port number of server application\n\
     image A list of one or more images to send\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/idb_viewer/idb_viewer.prj
+++ ctn-3.2.0+dfsg.orig/apps/idb_viewer/idb_viewer.prj
@@ -261,7 +261,7 @@
 \n\\
     database is the name of the image database to be viewed\n";\
 \
-    fprintf(stderr, msg);\
+    fprintf(stderr, "%s", msg);\
     exit(1);\
 }\
 
--- ctn-3.2.0+dfsg.orig.orig/apps/idb_viewer/idb_viewer.c
+++ ctn-3.2.0+dfsg.orig/apps/idb_viewer/idb_viewer.c
@@ -230,6 +230,6 @@
 \n\
     database is the name of the image database to be viewed\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/fis_server/fis_server.c
+++ ctn-3.2.0+dfsg.orig/apps/fis_server/fis_server.c
@@ -241,7 +241,7 @@
 \n\
     port  TCP/IP port address\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/fis_server/wlma_server.c
+++ ctn-3.2.0+dfsg.orig/apps/fis_server/wlma_server.c
@@ -187,7 +187,7 @@
 \n\
     port  TCP/IP port address\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_dump_element/dcm_dump_element.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_dump_element/dcm_dump_element.c
@@ -397,7 +397,7 @@
     group element   The tag of the element to be dumped\n\
     filein fileout  Input and output files\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
 
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_make_object/dcm_make_object.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_make_object/dcm_make_object.c
@@ -182,7 +182,7 @@
 \n\
     file       The file created\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_diff/dcm_diff.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_diff/dcm_diff.c
@@ -491,6 +491,6 @@
 \n\
     file1 file2 \n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_rm_group/dcm_rm_group.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_rm_group/dcm_rm_group.c
@@ -182,6 +182,6 @@
   filein fileout    Input and output files\n\
   group [group ..]  One or more groups to be removed from filein\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/print_server/print_server.c
+++ ctn-3.2.0+dfsg.orig/apps/print_server/print_server.c
@@ -435,7 +435,7 @@
 \n\
     port  TCP/IP port address\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_to_html/dcm_to_html.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_to_html/dcm_to_html.c
@@ -541,6 +541,6 @@
 \n\
     file1 file2 \n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/storage_classes/storage_classes.c
+++ ctn-3.2.0+dfsg.orig/apps/storage_classes/storage_classes.c
@@ -233,7 +233,7 @@
     char msg[] =
     "Usage: storage_classes [-a calling Title] [-c calledTitle] node port\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/send_results/send_results.c
+++ ctn-3.2.0+dfsg.orig/apps/send_results/send_results.c
@@ -381,7 +381,7 @@
 \n\
   destinationAETitle	An AE title found in the control database\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/idb_dump/idb_dump.c
+++ ctn-3.2.0+dfsg.orig/apps/idb_dump/idb_dump.c
@@ -112,7 +112,7 @@
 \n\
 <object type> is PATIENT, STUDY, SERIES, INSTANCE\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(5);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/send_study/send_study.c
+++ ctn-3.2.0+dfsg.orig/apps/send_study/send_study.c
@@ -426,7 +426,7 @@
 \n\
   destinationAETitle	An AE title found in the control database\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_mb_to_euc/dcm_mb_to_euc.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_mb_to_euc/dcm_mb_to_euc.c
@@ -82,7 +82,7 @@
 \n\
     file      One or more information objects to be dumped\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_dump_file/dcm_dump_file.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_dump_file/dcm_dump_file.c
@@ -262,6 +262,6 @@
 \n\
     file      One or more information objects to be dumped\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/image_archive/archive_agent.c
+++ ctn-3.2.0+dfsg.orig/apps/image_archive/archive_agent.c
@@ -159,7 +159,7 @@
   -h  Print help message and exit\n\
   -i  Set FIS database name (default LTA_FIS)\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/image_archive/dump_commit_requests.c
+++ ctn-3.2.0+dfsg.orig/apps/image_archive/dump_commit_requests.c
@@ -128,7 +128,7 @@
 \n\
   fis database  Name of the database to query\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/image_archive/archive_server.c
+++ ctn-3.2.0+dfsg.orig/apps/image_archive/archive_server.c
@@ -160,7 +160,7 @@
 \n\
     port  TCP/IP port address\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(5);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/image_archive/archive_cleaner.c
+++ ctn-3.2.0+dfsg.orig/apps/image_archive/archive_cleaner.c
@@ -364,7 +364,7 @@
   -h  Print help message and exit\n\
   -n  Do not actually perform the delete\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
@@ -384,7 +384,7 @@
   -n  Do not actually perform the delete\n\
   -v  Place in verbose mode\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_iterator/dcm_iterator.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_iterator/dcm_iterator.c
@@ -286,6 +286,6 @@
 \n\
     file      One or more information objects to be dumped\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/ris_gateway/ris_gateway.c
+++ ctn-3.2.0+dfsg.orig/apps/ris_gateway/ris_gateway.c
@@ -234,7 +234,7 @@
 \n\
     port  TCP/IP port address\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/mwlQuery/mwlQuery.c
+++ ctn-3.2.0+dfsg.orig/apps/mwlQuery/mwlQuery.c
@@ -327,7 +327,7 @@
     node  Node name of server\n\
     port  Port number of server\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/new_uids/new_uids.c
+++ ctn-3.2.0+dfsg.orig/apps/new_uids/new_uids.c
@@ -101,7 +101,7 @@
 \n\
   filein fileout  Input and output files\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_dump_compressed/dcm_dump_compressed.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_dump_compressed/dcm_dump_compressed.c
@@ -220,7 +220,7 @@
     group element   The tag of the element to be dumped\n\
     filein fileout  Input and output files\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
 
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/rsa_ui/rsa_ui.c
+++ ctn-3.2.0+dfsg.orig/apps/rsa_ui/rsa_ui.c
@@ -254,6 +254,6 @@
     -h  Display help page\n\
     -x  Place <facility> in verbose mode (TBL)\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
--- ctn-3.2.0+dfsg.orig.orig/apps/rsa_ui/rsa_ui.prj
+++ ctn-3.2.0+dfsg.orig/apps/rsa_ui/rsa_ui.prj
@@ -283,7 +283,7 @@
     -h  Display help page\n\\
     -x  Place <facility> in verbose mode (TBL)\n";\
 \
-    fprintf(stderr, msg);\
+    fprintf(stderr, "%s", msg);\
     exit(1);\
 }\
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_mask_image/dcm_mask_image.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_mask_image/dcm_mask_image.c
@@ -82,7 +82,7 @@
   -p  Pattern is one of left, right, top, bottom\n\
   -x  Set the value to replace pixels; default is 0 \n";
 
-  fprintf(stderr, msg);
+  fprintf(stderr, "%s", msg);
   exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/print_clients/print_client.c
+++ ctn-3.2.0+dfsg.orig/apps/print_clients/print_client.c
@@ -625,7 +625,7 @@
     port  TCP/IP port number of print server\n\
     file  One or more files that contain preformatted images for printing\n";
 
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_modify_elements/dcm_modify_elements.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_modify_elements/dcm_modify_elements.c
@@ -211,7 +211,7 @@
   filein   File that contains original DICOM object \n\
   fileout  File that stores the modified DICOM object \n";
 
-  fprintf(stdout, msg);
+  fprintf(stdout, "%s", msg);
   exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_modify_object/dcm_modify_object.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_modify_object/dcm_modify_object.c
@@ -257,7 +257,7 @@
   filein   File that contains original DICOM object \n\
   fileout  FIle that stores the modified DICOM object \n";
 
-  fprintf(stdout, msg);
+  fprintf(stdout, "%s", msg);
   exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/dcm_strip_odd_groups/dcm_strip_odd_groups.c
+++ ctn-3.2.0+dfsg.orig/apps/dcm_strip_odd_groups/dcm_strip_odd_groups.c
@@ -112,7 +112,7 @@
   filein   File that contains original DICOM object \n\
   fileout  File that stores the modified DICOM object \n";
 
-  fprintf(stdout, msg);
+  fprintf(stdout, "%s", msg);
   exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/pdu_examples/ex4_acceptor.c
+++ ctn-3.2.0+dfsg.orig/apps/pdu_examples/ex4_acceptor.c
@@ -388,7 +388,7 @@
 \n\
     port  The TCP/IP port number to use\n";
 
-    (void) fprintf(stderr, usage);
+    (void) fprintf(stderr, "%s", usage);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/simple_pacs/simple_pacs.c
+++ ctn-3.2.0+dfsg.orig/apps/simple_pacs/simple_pacs.c
@@ -377,7 +377,7 @@
     char usage[] =
     "Usage: simple_storage [-a] [-d FAC] [-p] [-t trips] [-v] port\n";
 
-    (void) fprintf(stderr, usage);
+    (void) fprintf(stderr, "%s", usage);
     exit(1);
 }
 
--- ctn-3.2.0+dfsg.orig.orig/apps/simple_storage/simple_storage.c
+++ ctn-3.2.0+dfsg.orig/apps/simple_storage/simple_storage.c
@@ -901,7 +901,7 @@
 \n\
     port  The TCP/IP port number to use\n";
 
-    (void) fprintf(stderr, usage);
+    (void) fprintf(stderr, "%s", usage);
     exit(1);
 }
 
