Control: tags -1 + fixed-upstream pending bookworm bullseye
Control: found -1 0.23.0-gtk3+dfsg-1+deb12u1
Control: found -1 0.16.3+dfsg-1+deb11u1

Greetings,

I am working on updating xmedcon in sid, which should resolve
the problem for the upcoming trixie.  I identified the patch
needed a slight porting effort to bookworm, but applies then
seamlessly on bullseye.  I plan to liaise with the release team
once done with the sid update and making sure there are no
obvious issues with patch ported to xmedcon 0.23.0.

I don't really have plans to work on bullseye port, but the
patch is in attachment in case someone from the LTS team wants
to take over.

Have a nice day,  :)
-- 
  .''`.  Étienne Mollier <[email protected]>
 : :' :  pgp: 8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
 `. `'   sent from /dev/pts/4, please excuse my verbosity
   `-    on air: Dream Theater - A Change Of Seasons
--- xmedcon-0.23.0-gtk3+dfsg.orig/libs/dicom/single.c
+++ xmedcon-0.23.0-gtk3+dfsg/libs/dicom/single.c
@@ -22,8 +22,9 @@
 SINGLE *dicom_single(void)
 {
   ELEMENT	*e;
-  S32		length;
+  S32		length, bytes;
   U32		i, f;
+  size_t    size;
   char		*interpretation[]=
   {
     "MONOCHROME2",
@@ -265,7 +266,17 @@
           /* eNlf: - allocate an extra 4 bytes, otherwise the bit.c   */
           /* eNlf: routines like source.u++ go beyond the boundaries  */
           /* eNlf: - memset the allocated buffer for sure             */
-          data = (U8*)malloc(width*height*pixel*frames+4);
+          bytes = (S64)width*height*pixel*frames+4;
+
+          /* check for overflow */
+          size = (size_t)bytes;
+          if ((S64)size != bytes) {
+            dicom_log(ERROR,"System size_t too small");
+            return 0L;
+          }
+
+          /* allocate memory */
+          data = (U8*)malloc(bytes);
           if (!data)
           {
             dicom_log(ERROR,"Out of memory");

Attachment: signature.asc
Description: PGP signature

Reply via email to