Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/djvulibre-3.5.28/doc/minilisp/minilisp.cpp
Examining data/djvulibre-3.5.28/libdjvu/Arrays.cpp
Examining data/djvulibre-3.5.28/libdjvu/Arrays.h
Examining data/djvulibre-3.5.28/libdjvu/BSByteStream.cpp
Examining data/djvulibre-3.5.28/libdjvu/BSByteStream.h
Examining data/djvulibre-3.5.28/libdjvu/BSEncodeByteStream.cpp
Examining data/djvulibre-3.5.28/libdjvu/ByteStream.cpp
Examining data/djvulibre-3.5.28/libdjvu/ByteStream.h
Examining data/djvulibre-3.5.28/libdjvu/DataPool.cpp
Examining data/djvulibre-3.5.28/libdjvu/DataPool.h
Examining data/djvulibre-3.5.28/libdjvu/DjVmDir.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVmDir.h
Examining data/djvulibre-3.5.28/libdjvu/DjVmDir0.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVmDir0.h
Examining data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVmDoc.h
Examining data/djvulibre-3.5.28/libdjvu/DjVmNav.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVmNav.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuAnno.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuDocEditor.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuDocEditor.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuDocument.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuDocument.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuDumpHelper.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuDumpHelper.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuErrorList.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuErrorList.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuFile.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuFileCache.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuFileCache.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuGlobal.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuGlobal.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuGlobalMemory.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuImage.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuImage.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuInfo.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuInfo.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuMessage.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuMessage.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuMessageLite.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuMessageLite.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuNavDir.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuNavDir.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuPalette.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuPalette.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuPort.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuPort.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuText.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuText.h
Examining data/djvulibre-3.5.28/libdjvu/DjVuToPS.cpp
Examining data/djvulibre-3.5.28/libdjvu/DjVuToPS.h
Examining data/djvulibre-3.5.28/libdjvu/GBitmap.cpp
Examining data/djvulibre-3.5.28/libdjvu/GBitmap.h
Examining data/djvulibre-3.5.28/libdjvu/GContainer.cpp
Examining data/djvulibre-3.5.28/libdjvu/GContainer.h
Examining data/djvulibre-3.5.28/libdjvu/GException.cpp
Examining data/djvulibre-3.5.28/libdjvu/GException.h
Examining data/djvulibre-3.5.28/libdjvu/GIFFManager.cpp
Examining data/djvulibre-3.5.28/libdjvu/GIFFManager.h
Examining data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp
Examining data/djvulibre-3.5.28/libdjvu/GMapAreas.h
Examining data/djvulibre-3.5.28/libdjvu/GOS.cpp
Examining data/djvulibre-3.5.28/libdjvu/GOS.h
Examining data/djvulibre-3.5.28/libdjvu/GPixmap.cpp
Examining data/djvulibre-3.5.28/libdjvu/GPixmap.h
Examining data/djvulibre-3.5.28/libdjvu/GRect.cpp
Examining data/djvulibre-3.5.28/libdjvu/GRect.h
Examining data/djvulibre-3.5.28/libdjvu/GScaler.cpp
Examining data/djvulibre-3.5.28/libdjvu/GScaler.h
Examining data/djvulibre-3.5.28/libdjvu/GSmartPointer.cpp
Examining data/djvulibre-3.5.28/libdjvu/GSmartPointer.h
Examining data/djvulibre-3.5.28/libdjvu/GString.cpp
Examining data/djvulibre-3.5.28/libdjvu/GString.h
Examining data/djvulibre-3.5.28/libdjvu/GThreads.cpp
Examining data/djvulibre-3.5.28/libdjvu/GThreads.h
Examining data/djvulibre-3.5.28/libdjvu/GURL.cpp
Examining data/djvulibre-3.5.28/libdjvu/GURL.h
Examining data/djvulibre-3.5.28/libdjvu/GUnicode.cpp
Examining data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp
Examining data/djvulibre-3.5.28/libdjvu/IFFByteStream.h
Examining data/djvulibre-3.5.28/libdjvu/IW44EncodeCodec.cpp
Examining data/djvulibre-3.5.28/libdjvu/IW44Image.cpp
Examining data/djvulibre-3.5.28/libdjvu/IW44Image.h
Examining data/djvulibre-3.5.28/libdjvu/JB2EncodeCodec.cpp
Examining data/djvulibre-3.5.28/libdjvu/JB2Image.cpp
Examining data/djvulibre-3.5.28/libdjvu/JB2Image.h
Examining data/djvulibre-3.5.28/libdjvu/JPEGDecoder.cpp
Examining data/djvulibre-3.5.28/libdjvu/JPEGDecoder.h
Examining data/djvulibre-3.5.28/libdjvu/MMRDecoder.cpp
Examining data/djvulibre-3.5.28/libdjvu/MMRDecoder.h
Examining data/djvulibre-3.5.28/libdjvu/MMX.cpp
Examining data/djvulibre-3.5.28/libdjvu/MMX.h
Examining data/djvulibre-3.5.28/libdjvu/Template.h
Examining data/djvulibre-3.5.28/libdjvu/UnicodeByteStream.cpp
Examining data/djvulibre-3.5.28/libdjvu/UnicodeByteStream.h
Examining data/djvulibre-3.5.28/libdjvu/XMLParser.cpp
Examining data/djvulibre-3.5.28/libdjvu/XMLParser.h
Examining data/djvulibre-3.5.28/libdjvu/XMLTags.cpp
Examining data/djvulibre-3.5.28/libdjvu/XMLTags.h
Examining data/djvulibre-3.5.28/libdjvu/ZPCodec.cpp
Examining data/djvulibre-3.5.28/libdjvu/ZPCodec.h
Examining data/djvulibre-3.5.28/libdjvu/atomic.cpp
Examining data/djvulibre-3.5.28/libdjvu/atomic.h
Examining data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp
Examining data/djvulibre-3.5.28/libdjvu/ddjvuapi.h
Examining data/djvulibre-3.5.28/libdjvu/debug.cpp
Examining data/djvulibre-3.5.28/libdjvu/debug.h
Examining data/djvulibre-3.5.28/libdjvu/miniexp.cpp
Examining data/djvulibre-3.5.28/libdjvu/miniexp.h
Examining data/djvulibre-3.5.28/tools/bzz.cpp
Examining data/djvulibre-3.5.28/tools/c44.cpp
Examining data/djvulibre-3.5.28/tools/cjb2.cpp
Examining data/djvulibre-3.5.28/tools/common.h
Examining data/djvulibre-3.5.28/tools/cpaldjvu.cpp
Examining data/djvulibre-3.5.28/tools/csepdjvu.cpp
Examining data/djvulibre-3.5.28/tools/ddjvu.cpp
Examining data/djvulibre-3.5.28/tools/djvm.cpp
Examining data/djvulibre-3.5.28/tools/djvmcvt.cpp
Examining data/djvulibre-3.5.28/tools/djvudump.cpp
Examining data/djvulibre-3.5.28/tools/djvuextract.cpp
Examining data/djvulibre-3.5.28/tools/djvumake.cpp
Examining data/djvulibre-3.5.28/tools/djvups.cpp
Examining data/djvulibre-3.5.28/tools/djvused.cpp
Examining data/djvulibre-3.5.28/tools/djvuserve.cpp
Examining data/djvulibre-3.5.28/tools/djvutxt.cpp
Examining data/djvulibre-3.5.28/tools/jb2cmp/classify.cpp
Examining data/djvulibre-3.5.28/tools/jb2cmp/classify.h
Examining data/djvulibre-3.5.28/tools/jb2cmp/cuts.cpp
Examining data/djvulibre-3.5.28/tools/jb2cmp/frames.cpp
Examining data/djvulibre-3.5.28/tools/jb2cmp/mdjvucfg.h
Examining data/djvulibre-3.5.28/tools/jb2cmp/minidjvu.h
Examining data/djvulibre-3.5.28/tools/jb2cmp/patterns.cpp
Examining data/djvulibre-3.5.28/tools/jb2cmp/patterns.h
Examining data/djvulibre-3.5.28/tools/jb2tune.cpp
Examining data/djvulibre-3.5.28/tools/jb2tune.h
Examining data/djvulibre-3.5.28/tools/tiff2pdf.c
Examining data/djvulibre-3.5.28/tools/tiff2pdf.h
Examining data/djvulibre-3.5.28/win32/jpeg/jconfig.h
Examining data/djvulibre-3.5.28/win32/tiff/tif_config.h
Examining data/djvulibre-3.5.28/win32/tiff/tiffconf.h
Examining data/djvulibre-3.5.28/xmltools/djvutoxml.cpp
Examining data/djvulibre-3.5.28/xmltools/djvuxmlparser.cpp

FINAL RESULTS:

data/djvulibre-3.5.28/libdjvu/GURL.cpp:1509:22:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
          ((lnklen = readlink(ret.NativeFilename(),lnkbuf,sizeof(lnkbuf))) > 0) )
data/djvulibre-3.5.28/libdjvu/UnicodeByteStream.cpp:177:20:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
UnicodeByteStream::gets(
data/djvulibre-3.5.28/libdjvu/UnicodeByteStream.cpp:218:15:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
      retval+=gets(t?(t-(i-bufferpos)):0,stopat,inclusive);
data/djvulibre-3.5.28/libdjvu/UnicodeByteStream.h:142:23:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
  virtual GUTF8String gets(size_t const t=0,unsigned long const stopat='\n',bool const inclusive=true); 
data/djvulibre-3.5.28/libdjvu/XMLTags.cpp:193:29:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
  GUTF8String tag,raw(xmlbs.gets(0,'<',false));
data/djvulibre-3.5.28/libdjvu/XMLTags.cpp:200:31:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
  for(int len;(len=(tag=xmlbs.gets(0,'>',true)).length());)
data/djvulibre-3.5.28/libdjvu/XMLTags.cpp:212:34:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
          GUTF8String cont(xmlbs.gets(0,'>',true));
data/djvulibre-3.5.28/libdjvu/XMLTags.cpp:246:36:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
            GUTF8String cont(xmlbs.gets(0,'>',true));
data/djvulibre-3.5.28/libdjvu/XMLTags.cpp:305:19:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
    if((raw=xmlbs.gets(0,'<',false))[0])
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:326:13:  [4] (buffer) scanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
ByteStream::scanf(const char *fmt, ...)
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:679:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(nfdstr, cstr);
data/djvulibre-3.5.28/libdjvu/ByteStream.h:229:7:  [4] (buffer) scanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
  int scanf(const char *fmt, ... );
data/djvulibre-3.5.28/libdjvu/DjVuMessage.cpp:571:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy( msg_buffer, converted );
data/djvulibre-3.5.28/libdjvu/DjVuMessage.cpp:586:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy( msg_buffer, converted );
data/djvulibre-3.5.28/libdjvu/DjVuMessageLite.cpp:426:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy( msg_buffer, converted );
data/djvulibre-3.5.28/libdjvu/DjVuToPS.cpp:290:24:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format (printf, 2, 3)));
data/djvulibre-3.5.28/libdjvu/GException.cpp:96:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(s, exc.cause);
data/djvulibre-3.5.28/libdjvu/GException.cpp:117:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(s, xcause);
data/djvulibre-3.5.28/libdjvu/GException.cpp:146:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(s, exc.cause);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1196:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(r.data,s1);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1198:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(r.data,s2);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1201:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(r.data,s2);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1443:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(retptr,ss);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1451:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(retptr,start);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1586:24:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
# define USE_VSNPRINTF vsnprintf
data/djvulibre-3.5.28/libdjvu/GString.cpp:1590:24:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
# define USE_VSNPRINTF vsnprintf
data/djvulibre-3.5.28/libdjvu/GString.cpp:1630:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(buffer, fmt, args);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:265:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(buffer, (const char *)xurl);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:309:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		  strcpy(buffer2,ptr);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:311:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		  strcpy(buffer,localhost);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:312:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		  strcat(buffer,buffer2);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1705:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(string_buffer, expand_name(from));
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1708:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(string_buffer, GOS::cwd());
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1760:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(string_buffer, (char const *)(from ? expand_name(from) : GOS::cwd()));
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1797:11:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
          strcpy(string_buffer,(const char *)GUTF8String(string_buffer).getNative2UTF8());
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:257:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(p, s);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:205:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(r->n, n);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:908:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(res,"#%s:<%p>",cname,this);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1671:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(b + l, s);
data/djvulibre-3.5.28/tools/ddjvu.cpp:190:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(stderr, fmt, args);
data/djvulibre-3.5.28/tools/ddjvu.cpp:213:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(stderr,i18n("\n-------- page %d -------\n"), pageno);
data/djvulibre-3.5.28/tools/ddjvu.cpp:423:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr,i18n("Producing PBM file.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:427:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr,i18n("Producing PGM file.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:431:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr,i18n("Producing PPM file.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:445:11:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
          fprintf(stderr,i18n("Producing RLE file.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:528:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr,i18n("Producing uncompressed TIFF file.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:531:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr,i18n("Producing TIFF/G4 file.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:535:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr,i18n("Producing TIFF/JPEG file.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:539:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr,i18n("Producing TIFF/DEFLATE file.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:543:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr,i18n("Producing TIFF/PACKBITS file.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:546:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr,i18n("Producing TIFF file.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:572:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(pagefilename, filename, pageno);
data/djvulibre-3.5.28/tools/ddjvu.cpp:610:11:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
          strcpy(tempfilename, outputfilename);
data/djvulibre-3.5.28/tools/ddjvu.cpp:620:15:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
          if (mktemp(tempfilename))
data/djvulibre-3.5.28/tools/ddjvu.cpp:656:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(pagefilename, filename, pageno);
data/djvulibre-3.5.28/tools/ddjvu.cpp:668:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(stderr,i18n("Converting temporary TIFF to PDF.\n"));
data/djvulibre-3.5.28/tools/ddjvu.cpp:741:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(stderr,i18n("Cannot decode page %d."), pageno);
data/djvulibre-3.5.28/tools/djvups.cpp:148:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(stderr, fmt, args);
data/djvulibre-3.5.28/tools/djvused.cpp:354:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  __attribute__ ((format (printf, 1, 2)));
data/djvulibre-3.5.28/tools/djvused.cpp:372:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  __attribute__ ((format (printf, 1, 2)));
data/djvulibre-3.5.28/tools/djvuserve.cpp:151:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(ctim,"%3s, %02d %3s %04d %02d:%02d:%02d GMT",
data/djvulibre-3.5.28/tools/djvuserve.cpp:155:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(stdout, fmt, ctim);
data/djvulibre-3.5.28/tools/djvutxt.cpp:134:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(stderr, fmt, args);
data/djvulibre-3.5.28/tools/djvutxt.cpp:316:17:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                fprintf(stderr,i18n("warning: duplicate option --page=...\n"));
data/djvulibre-3.5.28/tools/djvutxt.cpp:324:17:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                fprintf(stderr,i18n("warning: duplicate option --detail.\n"));
data/djvulibre-3.5.28/tools/tiff2pdf.c:98:10:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
# define snprintf mysnprintf
data/djvulibre-3.5.28/tools/tiff2pdf.c:100:1:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
snprintf(char* str, size_t size, const char* format, ...)
data/djvulibre-3.5.28/tools/tiff2pdf.c:105:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  count = vsnprintf(str, size, format, ap);
data/djvulibre-3.5.28/win32/tiff/tif_config.h:109:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/djvulibre-3.5.28/win32/tiff/tif_config.h:109:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/djvulibre-3.5.28/libdjvu/DjVuMessage.cpp:189:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char *path=getenv("PATH");
data/djvulibre-3.5.28/libdjvu/DjVuMessage.cpp:270:33:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const GUTF8String envp(GOS::getenv(DjVuEnv));
data/djvulibre-3.5.28/libdjvu/DjVuMessage.cpp:302:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    GUTF8String home=GOS::getenv("HOME");
data/djvulibre-3.5.28/libdjvu/DjVuMessage.cpp:348:33:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    GUTF8String defaultlocale = getenv("LANGUAGE");
data/djvulibre-3.5.28/libdjvu/GOS.cpp:343:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
GOS::getenv(const GUTF8String &name)
data/djvulibre-3.5.28/libdjvu/GOS.cpp:348:23:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *env=::getenv(name.getUTF82Native());
data/djvulibre-3.5.28/libdjvu/GOS.h:131:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  static GUTF8String getenv(const GUTF8String &name);
data/djvulibre-3.5.28/libdjvu/GThreads.cpp:200:3:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
  InitializeCriticalSection(&cs);
data/djvulibre-3.5.28/libdjvu/GThreads.cpp:208:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(&cs);
data/djvulibre-3.5.28/libdjvu/GThreads.cpp:222:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&cs);
data/djvulibre-3.5.28/libdjvu/GThreads.cpp:304:7:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
      EnterCriticalSection(&cs);
data/djvulibre-3.5.28/libdjvu/GThreads.cpp:339:7:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
      EnterCriticalSection(&cs);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1678:26:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    }else if ((senv=GOS::getenv("HOME")).length())
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1682:26:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    }else if ((senv=GOS::getenv("LOGNAME")).length())
data/djvulibre-3.5.28/libdjvu/MMX.cpp:143:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char *envvar = getenv("LIBDJVU_DISABLE_MMX");
data/djvulibre-3.5.28/libdjvu/atomic.cpp:47:12:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    CS() { InitializeCriticalSection(&cs); }
data/djvulibre-3.5.28/libdjvu/atomic.cpp:51:22:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
# define MUTEX_ENTER EnterCriticalSection(&globalCS.cs);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:89:10:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
  CS() { InitializeCriticalSection(&cs); }
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:93:16:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  CSLocker() { EnterCriticalSection(&globalCS.cs); }
data/djvulibre-3.5.28/tools/djvuserve.cpp:360:40:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
          g().pathinfo = GNativeString(getenv("PATH_INFO"));
data/djvulibre-3.5.28/tools/djvuserve.cpp:361:46:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
          g().pathtranslated = GNativeString(getenv("PATH_TRANSLATED"));
data/djvulibre-3.5.28/tools/djvuserve.cpp:366:45:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
          g().requestmethod = GNativeString(getenv("REQUEST_METHOD"));
data/djvulibre-3.5.28/tools/djvuserve.cpp:367:41:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
          g().querystring = GUTF8String(getenv("QUERY_STRING"));
data/djvulibre-3.5.28/tools/tiff2pdf.c:159:1:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
getopt(int argc, char * const argv[], const char *optstring)
data/djvulibre-3.5.28/tools/tiff2pdf.c:851:14:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	       (c = getopt(argc, (void*)argv,
data/djvulibre-3.5.28/doc/minilisp/minilisp.cpp:1094:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f = fopen(miniexp_to_str(argv[0]), "r");
data/djvulibre-3.5.28/doc/minilisp/minilisp.cpp:1113:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f = fopen("minilisp.in","r");
data/djvulibre-3.5.28/libdjvu/BSByteStream.cpp:209:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char xmtf[256]={
data/djvulibre-3.5.28/libdjvu/BSByteStream.cpp:242:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char mtf[256];
data/djvulibre-3.5.28/libdjvu/BSByteStream.cpp:243:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(mtf,xmtf,sizeof(xmtf));
data/djvulibre-3.5.28/libdjvu/BSByteStream.cpp:406:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(buffer, data+bptr, bytes);
data/djvulibre-3.5.28/libdjvu/BSEncodeByteStream.cpp:819:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char mtf[256];
data/djvulibre-3.5.28/libdjvu/BSEncodeByteStream.cpp:820:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char rmtf[256];
data/djvulibre-3.5.28/libdjvu/BSEncodeByteStream.cpp:992:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(data+bptr, buffer, bytes);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:370:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[1024];
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:389:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[1024];
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:513:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char c[1];
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:522:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char c[2];
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:532:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char c[3];
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:543:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char c[4];
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:555:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char c[1];
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:564:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char c[2];
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:573:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char c[3];
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:582:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char c[4];
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:698:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    retval = fopen((const char *)url.NativeFilename(),mode);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:702:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  retval = fopen(cnfd, mode);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:705:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    retval = fopen((const char*)url.UTF8Filename(), mode);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:708:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  retval = fopen((const char *)url.NativeFilename(),mode);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:710:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    retval = fopen((const char *)url.UTF8Filename(),mode);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:723:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  retval = open(cnfd, mode, perm);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:726:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    retval = open((const char*)url.UTF8Filename(), mode, perm);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:729:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  retval = open((const char *)url.NativeFilename(),mode,perm);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:731:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    retval = open((const char *)url.UTF8Filename(),mode,perm);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:918:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy( (void*)&blocks[where>>12][where&0xfff], buffer, (size_t)n);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:942:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(buffer, (void*)&blocks[pos>>12][pos&0xfff], (size_t)n);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:1013:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buffer, data+where, nsz);
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:779:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:922:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:1411:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:1676:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char			buffer[512];
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:1713:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(data, buffer+buffer_pos, size);
data/djvulibre-3.5.28/libdjvu/DjVmDir.cpp:293:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVmDir.cpp:299:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy((char*) strings+strings_size, buffer, length);
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:78:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char octets[4]={0x41,0x54,0x26,0x54};
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:98:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:179:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[4];
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:200:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:478:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:97:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   static const char * const GLObjectString[LIST+1];
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:231:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char buf[8];
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:234:11:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
          sprintf(buf,"\\%03o", (int)(((unsigned char*)data)[span]));
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:753:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVuDocEditor.cpp:86:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char octets[4]={0x41,0x54,0x26,0x54};
data/djvulibre-3.5.28/libdjvu/DjVuDocEditor.cpp:695:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVuDocument.cpp:87:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char octets[4]={0x41,0x54,0x26,0x54};
data/djvulibre-3.5.28/libdjvu/DjVuDocument.cpp:1131:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp:554:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp:2587:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp:2610:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp:2730:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVuImage.cpp:515:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVuInfo.cpp:106:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buffer[10];
data/djvulibre-3.5.28/libdjvu/DjVuNavDir.cpp:106:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[1024];
data/djvulibre-3.5.28/libdjvu/DjVuPalette.cpp:177:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char p[3];
data/djvulibre-3.5.28/libdjvu/DjVuPalette.cpp:270:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      unsigned char pmax[3];
data/djvulibre-3.5.28/libdjvu/DjVuPalette.cpp:271:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      unsigned char pmin[3];
data/djvulibre-3.5.28/libdjvu/DjVuPalette.cpp:495:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      unsigned char p[3];
data/djvulibre-3.5.28/libdjvu/DjVuPalette.cpp:519:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      unsigned char p[3];
data/djvulibre-3.5.28/libdjvu/DjVuPalette.cpp:544:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      unsigned char p[3];
data/djvulibre-3.5.28/libdjvu/DjVuPalette.cpp:576:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      unsigned char p[3];
data/djvulibre-3.5.28/libdjvu/DjVuPalette.h:213:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  struct PColor { unsigned char p[4]; };
data/djvulibre-3.5.28/libdjvu/DjVuText.cpp:751:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *tags[8]=
data/djvulibre-3.5.28/libdjvu/DjVuToPS.cpp:262:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char bin2hex[256][2];
data/djvulibre-3.5.28/libdjvu/DjVuToPS.cpp:1417:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(rle_out, encode_to, bytes_left);
data/djvulibre-3.5.28/libdjvu/DjVuToPS.cpp:1807:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                  memcpy(rle_out, encode_to, bytes_left);
data/djvulibre-3.5.28/libdjvu/DjVuToPS.cpp:1915:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char buffer[5];
data/djvulibre-3.5.28/libdjvu/DjVuToPS.cpp:1916:11:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
          sprintf(buffer,"\\%03o", *(unsigned char*)data);
data/djvulibre-3.5.28/libdjvu/DjVuToPS.h:267:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char ramp[256];
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:243:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy( (void*)row, (void*)ref[n],  ncolumns );
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:301:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char magic[2];
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:503:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char conv[256];
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:863:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              unsigned char x[2];
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:1246:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy((void*)runs, rle, rlelength);
data/djvulibre-3.5.28/libdjvu/GContainer.h:265:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      { ::memcpy(dst, src, SZ*n); }
data/djvulibre-3.5.28/libdjvu/GIFFManager.h:164:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char			name[5];
data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp:264:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char buf[8];
data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp:267:11:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
          sprintf(buf,"\\%03o", (int)(((unsigned char*)data)[span]));
data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp:530:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((open && points<2) || (!open && points<3))
data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp:530:31:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((open && points<2) || (!open && points<3))
data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp:565:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      while(((open && i+1<sides) || !open) &&
data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp:565:38:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      while(((open && i+1<sides) || !open) &&
data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp:584:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   if (open)
data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp:706:4:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   open(_open), points(_points)
data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp:708:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   sides=points-(open!=0);
data/djvulibre-3.5.28/libdjvu/GMapAreas.cpp:725:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    sides=points-(open!=0);
data/djvulibre-3.5.28/libdjvu/GMapAreas.h:358:38:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   {return new GMapPoly(xx,yy,points,open);}
data/djvulibre-3.5.28/libdjvu/GMapAreas.h:416:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   bool		open;
data/djvulibre-3.5.28/libdjvu/GOS.cpp:197:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char string_buffer[4];
data/djvulibre-3.5.28/libdjvu/GOS.cpp:328:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char drv[2];
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:647:33:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                       unsigned char gtable[256][3] )
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:686:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                             unsigned char gtable[256][3] )
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:697:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      static unsigned char ctable[256][3];
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:705:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(gtable, ctable, 256*3*sizeof(unsigned char));
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:716:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char gtable[256][3];
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:748:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char gtable[256][3];
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:778:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static unsigned char quantize[256+0x33+0x33];
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:832:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static unsigned char quantize[256+8+8];
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:1359:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char clip[512];
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:1628:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char gtable[256][3];
data/djvulibre-3.5.28/libdjvu/GSmartPointer.cpp:190:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(nptr, ptr, s);
data/djvulibre-3.5.28/libdjvu/GString.cpp:763:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  return atoi(data);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1513:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          unsigned char utf8char[7];
data/djvulibre-3.5.28/libdjvu/GString.cpp:1872:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf((char *)r,"&#%lu;",(unsigned long)w0);
data/djvulibre-3.5.28/libdjvu/GString.cpp:2663:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char s[2]; s[0]=ch; s[1]=0;
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1505:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char lnkbuf[MAXPATHLEN+1];
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1765:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char  drv[4];
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:109:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
           && !((unsigned char *)buf)[2] && !((unsigned char *)buf)[3])
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:109:57:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
           && !((unsigned char *)buf)[2] && !((unsigned char *)buf)[3])
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:121:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
           && !((unsigned char *)buf)[2] && !((unsigned char *)buf)[3])
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:121:57:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
           && !((unsigned char *)buf)[2] && !((unsigned char *)buf)[3])
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:248:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf,r->remainder,s);
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:249:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy((void *)((size_t)buf+s),xbuf,bufsize);
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:263:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(buf,r->remainder,s);
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:511:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(retval->data,utf8buf,size);
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:721:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(remainder,buf,size);
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:732:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(remainder,buf,size);
data/djvulibre-3.5.28/libdjvu/GUnicode.cpp:745:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(remainder,xremainder->remainder,size);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:171:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[8];
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:272:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy( (void*)(nctx->idOne), (void*)&buffer[0], 4);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:273:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy( (void*)(nctx->idTwo), (void*)&buffer[4], 4);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:278:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy( (void*)(nctx->idOne), (void*)&buffer[0], 4);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:313:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[8];
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:348:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy((void*)&buffer[0], (void*)&chkid[0], 4);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:353:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy((void*)&buffer[4], (void*)&chkid[5], 4);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:367:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy( (void*)(nctx->idOne), (void*)&buffer[0], 4);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:368:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy( (void*)(nctx->idTwo), (void*)&buffer[4], 4);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:373:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy( (void*)(nctx->idOne), (void*)&buffer[0], 4);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:401:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[4];
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:538:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[4096];
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:543:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf2[sizeof(buf)];
data/djvulibre-3.5.28/libdjvu/IFFByteStream.h:289:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char idOne[4];
data/djvulibre-3.5.28/libdjvu/IFFByteStream.h:290:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char idTwo[4];
data/djvulibre-3.5.28/libdjvu/IW44EncodeCodec.cpp:838:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy((void*)m, (void*)mask8, w);
data/djvulibre-3.5.28/libdjvu/IW44EncodeCodec.cpp:1429:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  signed char  bconv[256];
data/djvulibre-3.5.28/libdjvu/IW44EncodeCodec.cpp:1607:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    msk8 = (signed char const *)((*mask)[0]);
data/djvulibre-3.5.28/libdjvu/IW44Image.cpp:698:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy((void*)pp, (void*)pl, 32*sizeof(short));
data/djvulibre-3.5.28/libdjvu/IW44Image.h:666:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char coeffstate[256];
data/djvulibre-3.5.28/libdjvu/IW44Image.h:667:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char bucketstate[16];
data/djvulibre-3.5.28/libdjvu/JPEGDecoder.cpp:157:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char msg[JMSG_LENGTH_MAX + 100];
data/djvulibre-3.5.28/libdjvu/JPEGDecoder.cpp:158:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(msg, "LibJpeg error: ");
data/djvulibre-3.5.28/libdjvu/MMRDecoder.cpp:359:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buffer[ VLSBUFSIZE ];
data/djvulibre-3.5.28/libdjvu/MMX.h:147:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef struct{ char c[8]; } MMX_t;
data/djvulibre-3.5.28/libdjvu/UnicodeByteStream.cpp:243:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buf[4];
data/djvulibre-3.5.28/libdjvu/ZPCodec.h:326:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char          ffzt[256];
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:1258:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(info, &myinfo, infosz);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:1277:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(info, &myinfo, infosz);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:1296:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(info, &myinfo, infosz);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:1436:23:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                      memcpy(pageinfo, &myinfo, infosz);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:1462:27:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                          memcpy(pageinfo, &myinfo, infosz);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:2195:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf, (const char*)p, 3*w);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:2289:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
fmt_convert_row(unsigned char *p, unsigned char g[256][4], int w, 
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:2289:44:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
fmt_convert_row(unsigned char *p, unsigned char g[256][4], int w, 
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:2393:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char g[256][4];
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:3220:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char buffer[1024];
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:3673:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[8];
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:3745:15:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
              sprintf(anno_dat.buf,"%03o", c);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:3754:15:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
              sprintf(anno_dat.buf,"\\%03o", c);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:3787:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024];
data/djvulibre-3.5.28/libdjvu/debug.cpp:200:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[257];
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:987:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(s, str, l);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1069:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char buffer[16]; /* 10+1 */
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1082:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(buffer,"u%04X", c);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1084:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(buffer,"U%06X", c);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1086:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(buffer,"u%04X\\u%04X", 
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1094:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(buffer, "%03o", c);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1170:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(d, s, n);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1259:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(r,"%f",val);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1261:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(r,"+%f",val);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1459:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buffer[32];
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1467:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(buffer, "%d", miniexp_to_int(p));
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1666:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(nb, b, l);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1711:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(ns, s, l);
data/djvulibre-3.5.28/tools/c44.cpp:697:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char prefix[16];
data/djvulibre-3.5.28/tools/cjb2.cpp:698:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char magic[2];
data/djvulibre-3.5.28/tools/csepdjvu.cpp:181:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char slice[16];  // background quality spec
data/djvulibre-3.5.28/tools/csepdjvu.cpp:211:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buffer[bufsize];
data/djvulibre-3.5.28/tools/csepdjvu.cpp:260:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buf, buffer+bufpos, size);
data/djvulibre-3.5.28/tools/csepdjvu.cpp:411:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[512];
data/djvulibre-3.5.28/tools/csepdjvu.cpp:533:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[256];
data/djvulibre-3.5.28/tools/csepdjvu.cpp:607:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      static char zeroes[4];
data/djvulibre-3.5.28/tools/csepdjvu.cpp:1837:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char pagename[20];
data/djvulibre-3.5.28/tools/csepdjvu.cpp:1838:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(pagename, "p%04d.djvu", ++pageno);
data/djvulibre-3.5.28/tools/ddjvu.cpp:611:11:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
          strcat(tempfilename, ".XXXXXX");
data/djvulibre-3.5.28/tools/ddjvu.cpp:617:24:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
          if ((tiffd = mkstemp(tempfilename)) >= 0)
data/djvulibre-3.5.28/tools/ddjvu.cpp:621:26:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if ((tiffd = open(tempfilename, O_RDWR|O_CREAT)) >= 0)
data/djvulibre-3.5.28/tools/ddjvu.cpp:640:28:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      } else if (! (fout = fopen(filename, "wb")))
data/djvulibre-3.5.28/tools/ddjvu.cpp:664:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      const char *args[3];
data/djvulibre-3.5.28/tools/ddjvu.cpp:688:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if (! (fout = fopen(filename, "wb")))
data/djvulibre-3.5.28/tools/ddjvu.cpp:925:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[32];
data/djvulibre-3.5.28/tools/djvm.cpp:215:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
   if (argc==5) page_num=atoi(argv[4])-1;
data/djvulibre-3.5.28/tools/djvm.cpp:234:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
   int page_num=atoi(argv[3])-1;
data/djvulibre-3.5.28/tools/djvm.cpp:269:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char buffer[128];
data/djvulibre-3.5.28/tools/djvm.cpp:270:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(buffer, "PAGE #%d", file->get_page_num()+1);
data/djvulibre-3.5.28/tools/djvudump.cpp:168:33:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (outputfile && !(outputf = fopen(outputfile,"w")))
data/djvulibre-3.5.28/tools/djvuextract.cpp:256:66:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              DjVuPrintErrorUTF8("  %s --> not found!\n", (const char *)dargv[i]);
data/djvulibre-3.5.28/tools/djvuextract.cpp:261:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              const GURL::Filename::UTF8 url((const char *)dargv[i].substr(5,-1));
data/djvulibre-3.5.28/tools/djvuextract.cpp:266:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                      (const char *)dargv[i], (const char *)dargv[i]+5, mbs.size());
data/djvulibre-3.5.28/tools/djvuextract.cpp:266:54:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                      (const char *)dargv[i], (const char *)dargv[i]+5, mbs.size());
data/djvulibre-3.5.28/tools/djvumake.cpp:236:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char magic[4];
data/djvulibre-3.5.28/tools/djvumake.cpp:311:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char magic[4];
data/djvulibre-3.5.28/tools/djvumake.cpp:362:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[24];
data/djvulibre-3.5.28/tools/djvumake.cpp:385:56:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      analyze_incl_chunk(GURL::Filename::UTF8(5+(const char *)argv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:387:56:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      analyze_djbz_chunk(GURL::Filename::UTF8(5+(const char *)argv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:403:36:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        const char *ptr = 5+(const char *)argv[i];
data/djvulibre-3.5.28/tools/djvumake.cpp:439:61:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            analyze_jb2_chunk(GURL::Filename::UTF8(5+(const char *)argv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:444:61:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            analyze_mmr_chunk(GURL::Filename::UTF8(5+(const char *)argv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:827:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char rgb[3];
data/djvulibre-3.5.28/tools/djvumake.cpp:855:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char rgb[3] = {0,0,0};
data/djvulibre-3.5.28/tools/djvumake.cpp:899:75:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              create_jb2_chunk(iff, "Sjbz", GURL::Filename::UTF8(5+(const char *)dargv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:908:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			       GURL::Filename::UTF8(5+(const char *)dargv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:937:35:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				GURL::Filename::UTF8(5+(const char *)dargv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:941:55:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              create_bg44_chunk(iff, "BG44", 5+(const char *)dargv[i]);
data/djvulibre-3.5.28/tools/djvumake.cpp:949:74:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              create_raw_chunk(iff, chkid, GURL::Filename::UTF8(5+(const char *)dargv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:957:74:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              create_raw_chunk(iff, chkid, GURL::Filename::UTF8(5+(const char *)dargv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:962:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              create_incl_chunk(iff, "INCL", (const char *)GUTF8String(dargv[i].substr(5,-1)));
data/djvulibre-3.5.28/tools/djvumake.cpp:969:72:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              create_masksub_chunks(iff, GURL::Filename::UTF8(4+(const char *)dargv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:981:74:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              create_raw_chunk(iff, chkid, GURL::Filename::UTF8(5+(const char *)dargv[i]));
data/djvulibre-3.5.28/tools/djvumake.cpp:986:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                                 (const char *)dargv[i]);
data/djvulibre-3.5.28/tools/djvumake.cpp:997:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              char rgb[3] = {0,0,0};
data/djvulibre-3.5.28/tools/djvups.cpp:95:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[52];
data/djvulibre-3.5.28/tools/djvups.cpp:276:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  else if (! (fout = fopen(outfile, "wb")))
data/djvulibre-3.5.28/tools/djvused.cpp:132:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buffer[bufsize];
data/djvulibre-3.5.28/tools/djvused.cpp:187:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buf, buffer+bufpos, size);
data/djvulibre-3.5.28/tools/djvused.cpp:264:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buffer[22];
data/djvulibre-3.5.28/tools/djvused.cpp:394:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char skip[4];
data/djvulibre-3.5.28/tools/djvused.cpp:395:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char term0[4] = "\n.\n";
data/djvulibre-3.5.28/tools/djvused.cpp:396:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char term1[4] = "\r.\r";
data/djvulibre-3.5.28/tools/djvused.cpp:461:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char buf[5];
data/djvulibre-3.5.28/tools/djvused.cpp:464:11:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
          sprintf(buf,"\\%03o", (int)(((unsigned char*)data)[0]));
data/djvulibre-3.5.28/tools/djvused.cpp:672:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      int pageno = atoi(pagid);
data/djvulibre-3.5.28/tools/djvused.cpp:1667:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  zone.rect.xmin = atoi(str);
data/djvulibre-3.5.28/tools/djvused.cpp:1671:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  zone.rect.ymin = atoi(str);
data/djvulibre-3.5.28/tools/djvused.cpp:1675:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  zone.rect.xmax = atoi(str);
data/djvulibre-3.5.28/tools/djvused.cpp:1679:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  zone.rect.ymax = atoi(str);
data/djvulibre-3.5.28/tools/djvused.cpp:1771:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char pagenumber[16];
data/djvulibre-3.5.28/tools/djvused.cpp:1772:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(pagenumber," # page %d", pageno);
data/djvulibre-3.5.28/tools/djvused.cpp:2028:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  int size = atoi(sizestr);
data/djvulibre-3.5.28/tools/djvuserve.cpp:148:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char ctim[128];
data/djvulibre-3.5.28/tools/djvutxt.cpp:290:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char buf[32];
data/djvulibre-3.5.28/tools/jb2cmp/frames.cpp:374:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pointers[i+1], pixels[i], w);
data/djvulibre-3.5.28/tools/tiff2pdf.c:374:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pdf_fileid[TIFF2PDF_FILEID_SIZE];
data/djvulibre-3.5.28/tools/tiff2pdf.c:376:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pdf_datetime[TIFF2PDF_DATETIME_SIZE];
data/djvulibre-3.5.28/tools/tiff2pdf.c:378:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pdf_creator[TIFF2PDF_CREATOR_SIZE];
data/djvulibre-3.5.28/tools/tiff2pdf.c:380:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pdf_author[TIFF2PDF_AUTHOR_SIZE];
data/djvulibre-3.5.28/tools/tiff2pdf.c:382:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pdf_title[TIFF2PDF_TITLE_SIZE];
data/djvulibre-3.5.28/tools/tiff2pdf.c:384:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pdf_subject[TIFF2PDF_SUBJECT_SIZE];
data/djvulibre-3.5.28/tools/tiff2pdf.c:386:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pdf_keywords[TIFF2PDF_KEYWORDS_SIZE];
data/djvulibre-3.5.28/tools/tiff2pdf.c:882:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				t2p->pdf_defaultcompressionquality=atoi(optarg);
data/djvulibre-3.5.28/tools/tiff2pdf.c:3031:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			unsigned char table_end[2];
data/djvulibre-3.5.28/tools/tiff2pdf.c:3874:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy((uint8*)data + i * 3, (uint8*)data + i * 4, 3);
data/djvulibre-3.5.28/tools/tiff2pdf.c:3939:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[16];
data/djvulibre-3.5.28/tools/tiff2pdf.c:3960:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:3994:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[64];
data/djvulibre-3.5.28/tools/tiff2pdf.c:4090:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:4142:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:4161:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:4191:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[512];
data/djvulibre-3.5.28/tools/tiff2pdf.c:4344:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:4385:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[256];
data/djvulibre-3.5.28/tools/tiff2pdf.c:4835:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[512];
data/djvulibre-3.5.28/tools/tiff2pdf.c:4885:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:4960:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[128];
data/djvulibre-3.5.28/tools/tiff2pdf.c:5037:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:5076:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:5113:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[256];
data/djvulibre-3.5.28/tools/tiff2pdf.c:5213:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:5229:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:5303:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/tools/tiff2pdf.c:5412:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[64];
data/djvulibre-3.5.28/tools/tiff2pdf.c:5439:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/djvulibre-3.5.28/doc/minilisp/minilisp.cpp:692:1:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
equal(miniexp_t a, miniexp_t b)
data/djvulibre-3.5.28/doc/minilisp/minilisp.cpp:700:14:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      return equal(miniexp_car(a),miniexp_car(b))
data/djvulibre-3.5.28/doc/minilisp/minilisp.cpp:701:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        && equal(miniexp_cdr(a),miniexp_cdr(b));
data/djvulibre-3.5.28/doc/minilisp/minilisp.cpp:717:11:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
DEFUN("=",equal,2,0) {
data/djvulibre-3.5.28/doc/minilisp/minilisp.cpp:718:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return equal(argv[0],argv[1]) ? s_true : 0;
data/djvulibre-3.5.28/doc/minilisp/minilisp.cpp:722:11:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return !equal(argv[0],argv[1]) ? s_true : 0;
data/djvulibre-3.5.28/doc/minilisp/minilisp.cpp:776:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
DEFUN("strlen",strlen,1,1) {
data/djvulibre-3.5.28/libdjvu/BSByteStream.cpp:92:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual size_t read(void *buffer, size_t sz);
data/djvulibre-3.5.28/libdjvu/BSByteStream.cpp:380:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
BSByteStream::Decode::read(void *buffer, size_t sz)
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:157:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual size_t read(void *buffer, size_t size);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:204:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual size_t read(void *buffer, size_t size);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:279:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual size_t read(void *buffer, size_t sz);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:333:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ByteStream::read(void *buffer, size_t sz)
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:372:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while((bytes=read(buffer, sizeof(buffer))))
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:393:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      long bytes = (long)read(buffer, xbytes);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:410:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int nitems = read(buffer, size);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:500:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      bytes = bsfrom.read((void*)buffer, bytes);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:660:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int wlen = strlen(cstr) + 1;
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:673:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen(cstr);
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:755:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ByteStream::Stdio::read(void *buffer, size_t size)
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:951:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ByteStream::Memory::read(void *buffer, size_t sz)
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:1006:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ByteStream::Static::read(void *buffer, size_t sz)
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:1322:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for(int i;readsize&&(i=bs.read(buffer+pos,readsize))>0;pos+=i,readsize-=i)
data/djvulibre-3.5.28/libdjvu/ByteStream.cpp:1328:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for(int i;((i=bs.read(buffer+pos,readsize))>0);
data/djvulibre-3.5.28/libdjvu/ByteStream.h:153:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual size_t read(void *buffer, size_t size);
data/djvulibre-3.5.28/libdjvu/ByteStream.h:382:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual size_t read(void *buffer, size_t size)
data/djvulibre-3.5.28/libdjvu/ByteStream.h:383:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    { return bs->read(buffer,size); }
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:781:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while((length=gstr->read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:926:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while((length=str.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:1413:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
         while((length = f->stream->read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:1663:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   virtual size_t read(void *buffer, size_t size);
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:1697:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
PoolByteStream::read(void *data, size_t size)
data/djvulibre-3.5.28/libdjvu/DataPool.cpp:1757:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(read(&c,1)<1)
data/djvulibre-3.5.28/libdjvu/DjVmDir.cpp:295:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while((length=bs_str.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DjVmDir0.cpp:123:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while(bs.read(&ch, 1) && ch) name+=ch;
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:100:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          while((length=iff_in.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:201:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   while ((nbytes = data.read(buffer, sizeof(buffer))))
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:436:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
DjVmDoc::read(const GP<DataPool> & pool)
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:472:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
DjVmDoc::read(ByteStream & str_in)
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:480:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   while((length=str_in.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:484:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   read(pool);
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:488:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
DjVmDoc::read(const GURL &url)
data/djvulibre-3.5.28/libdjvu/DjVmDoc.cpp:509:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
     read(pool);
data/djvulibre-3.5.28/libdjvu/DjVmDoc.h:180:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   void	read(ByteStream & str);
data/djvulibre-3.5.28/libdjvu/DjVmDoc.h:183:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   void	read(const GP<DataPool> & data_pool);
data/djvulibre-3.5.28/libdjvu/DjVmDoc.h:197:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   void	read(const GURL &url);
data/djvulibre-3.5.28/libdjvu/DjVmNav.cpp:128:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      readsize = bs.read(buffer,textsize);
data/djvulibre-3.5.28/libdjvu/DjVmNav.cpp:136:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      readsize = bs.read(buffer,textsize);
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:275:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (!compact && *cur_pos+strlen(to_print)>70)
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:283:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  str.write(to_print, strlen(to_print));
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:286:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  *cur_pos+=strlen(to_print)+1;
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:289:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int indent=*cur_pos-strlen(to_print);
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:755:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   while((length=str.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:836:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   end=color+strlen(color); start=end-2;
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:842:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   end=color+strlen(color)-2; start=end-2;
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:848:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   end=color+strlen(color)-4; start=end-2;
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:854:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   end=color+strlen(color)-6; start=end-2;
data/djvulibre-3.5.28/libdjvu/DjVuAnno.cpp:1395:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   str.read(ans.getbuf(size), size);
data/djvulibre-3.5.28/libdjvu/DjVuDocEditor.cpp:697:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while((length=iff_in.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DjVuDocument.cpp:1133:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          while((length=iff.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DjVuDumpHelper.cpp:227:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   while(iff.read(&ch, 1) && ch!='\n')
data/djvulibre-3.5.28/libdjvu/DjVuErrorList.cpp:150:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
         doc->read(*bs);
data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp:107:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual size_t read(void *buffer, size_t size)
data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp:118:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      rc=str->read(buffer, size);
data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp:556:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while((length=str.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp:2589:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while((length=iff_in.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp:2613:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        (length=iff_in.read(buffer, 1024));)
data/djvulibre-3.5.28/libdjvu/DjVuFile.cpp:2732:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while((length=iff_in.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DjVuImage.cpp:516:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while((length=str.read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/DjVuNavDir.cpp:109:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	 if ((eof=!str.read(ptr, 1)) || *ptr=='\n') break;
data/djvulibre-3.5.28/libdjvu/DjVuNavDir.cpp:112:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (!strlen(buffer)) continue;
data/djvulibre-3.5.28/libdjvu/DjVuText.cpp:347:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int readsize = bs.read(buffer,textsize);
data/djvulibre-3.5.28/libdjvu/DjVuText.cpp:353:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if ( bs.read( (void*) &version, 1 ) == 1) 
data/djvulibre-3.5.28/libdjvu/DjVuToPS.cpp:344:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (pswd->pw_gecos && strlen(pswd->pw_gecos))
data/djvulibre-3.5.28/libdjvu/DjVuToPS.cpp:346:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      else if (pswd->pw_name && strlen(pswd->pw_name))
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:759:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        do { } while (bs.read(&c,1) && c!='\n' && c!='\r');
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:761:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      bs.read(&c, 1);
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:771:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      bs.read(&c, 1);
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:787:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          bs.read(&bit,1);
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:791:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              bs.read(&bit,1); 
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:834:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              bs.read(&acc, 1);
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:864:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              bs.read((void*)&x, 2);
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:873:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              bs.read((void*)&x, 1);
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:893:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (bs.read(&h, 1) <= 0)
data/djvulibre-3.5.28/libdjvu/GBitmap.cpp:898:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          if (bs.read(&h, 1) <= 0)
data/djvulibre-3.5.28/libdjvu/GException.cpp:95:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      char *s = new char[strlen(exc.cause)+1];
data/djvulibre-3.5.28/libdjvu/GException.cpp:116:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      char *s = new char[strlen(xcause)+1];
data/djvulibre-3.5.28/libdjvu/GException.cpp:145:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      char *s = new char[strlen(exc.cause)+1];
data/djvulibre-3.5.28/libdjvu/GException.cpp:192:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const int n1=end_s1?(int)((size_t)end_s1-(size_t)s1):strlen(s1);
data/djvulibre-3.5.28/libdjvu/GException.cpp:194:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const int n2=end_s2?(int)((size_t)end_s2-(size_t)s2):strlen(s2);
data/djvulibre-3.5.28/libdjvu/GIFFManager.cpp:118:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(GIFFChunk::name, (const char *)name, 4);
data/djvulibre-3.5.28/libdjvu/GIFFManager.cpp:120:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for(int i=strlen(GIFFChunk::name);i<4;i++)
data/djvulibre-3.5.28/libdjvu/GOS.cpp:221:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const char *s = fname + strlen(fname);
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:450:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        do { } while (bs.read(&c,1) && c!='\n' && c!='\r');
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:452:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      bs.read(&c, 1);
data/djvulibre-3.5.28/libdjvu/GPixmap.cpp:462:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      bs.read(&c, 1);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1017:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const int length=s?strlen(s):0;
data/djvulibre-3.5.28/libdjvu/GString.cpp:1038:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const unsigned int length=(start<0 || len<0)?(unsigned int)strlen(s):(unsigned int)(-1);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1186:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const int length1=(s1?strlen(s1):0);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1187:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const int length2=(s2?strlen(s2):0);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1220:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    n=strlen(data);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1225:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ndata,data,n);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1352:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy((char *)buf,data,n);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1364:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy((char *)buf_ptr,xptr,len);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1436:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(retptr,start,len);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1442:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len=strlen(ss);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1810:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const size_t length=strlen(data);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1848:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const size_t length=strlen(data);
data/djvulibre-3.5.28/libdjvu/GString.cpp:1873:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    r += strlen((char *)r);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:123:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#   define NAMLEN(dirent) strlen((dirent)->d_name)
data/djvulibre-3.5.28/libdjvu/GURL.cpp:151:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#   define NAMLEN(dirent) strlen((dirent)->d_name)
data/djvulibre-3.5.28/libdjvu/GURL.cpp:250:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   const int length=strlen(ptr);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:308:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                  GPBuffer<char> gbuffer2(buffer2,strlen(ptr)+1);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:310:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		  gbuffer.resize(strlen(ptr)+sizeof(localhost));
data/djvulibre-3.5.28/libdjvu/GURL.cpp:333:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  ptr=start+strlen(start)-2;
data/djvulibre-3.5.28/libdjvu/GURL.cpp:339:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  ptr=start+strlen(start)-3;
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1069:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  GPBuffer<unsigned char> gd(retval,strlen(s)*3+1);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1324:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    else if ( (strlen(url_ptr) > 4)         // "file://<letter>:/<path>"
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1331:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    else if ( (strlen(url_ptr)) > 2 // "file:/<path>"
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1341:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      GPBuffer<char> gl_url(l_url,strlen(url_ptr)+1);
data/djvulibre-3.5.28/libdjvu/GURL.cpp:1710:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char *s = string_buffer + strlen(string_buffer);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:192:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      bytes = bs->read( (void*)buffer, 1);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:474:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
IFFByteStream::read(void *buffer, size_t size)
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:489:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  size_t bytes = bs->read(buffer, size);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:540:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while((len=read(buf,sizeof(buf))))
data/djvulibre-3.5.28/libdjvu/IFFByteStream.cpp:546:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          const int i=iff.read(buf2+s,len-s);
data/djvulibre-3.5.28/libdjvu/IFFByteStream.h:191:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual size_t read(void *buffer, size_t size);
data/djvulibre-3.5.28/libdjvu/JPEGDecoder.cpp:159:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *emsg = msg + strlen(msg);
data/djvulibre-3.5.28/libdjvu/MMRDecoder.cpp:439:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            bufmax = inp.read((void*)buffer, size);
data/djvulibre-3.5.28/libdjvu/UnicodeByteStream.cpp:118:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
UnicodeByteStream::read(void *buf, size_t size)
data/djvulibre-3.5.28/libdjvu/UnicodeByteStream.cpp:121:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  const int retval=bs->read(buf,size);
data/djvulibre-3.5.28/libdjvu/UnicodeByteStream.cpp:188:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while((i=read(buf,bufsize)>0))
data/djvulibre-3.5.28/libdjvu/UnicodeByteStream.h:147:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual size_t read(void *buffer, size_t size);
data/djvulibre-3.5.28/libdjvu/XMLParser.cpp:1055:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    textbs->read(txt->textUTF8.getbuf(len), len);
data/djvulibre-3.5.28/libdjvu/ZPCodec.cpp:741:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (! bs->read((void*)&byte, 1))
data/djvulibre-3.5.28/libdjvu/ZPCodec.cpp:744:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (! bs->read((void*)&byte, 1))
data/djvulibre-3.5.28/libdjvu/ZPCodec.cpp:763:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (bs->read((void*)&byte, 1) < 1) 
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:253:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int l = strlen(s);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:3222:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          while((length=incl->read(buffer, 1024)))
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:3746:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              anno_dat.blen = strlen(anno_dat.buf);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:3755:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              anno_dat.blen = strlen(anno_dat.buf);
data/djvulibre-3.5.28/libdjvu/ddjvuapi.cpp:3789:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((length=bs->read(buffer, sizeof(buffer))))
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:203:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      r->n = new char [1+strlen(n)];
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:907:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char *res = new char[strlen(cname)+24];
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1138:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return miniexp_lstring(strlen(s), s);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1151:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t l = strlen(s);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1303:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return ::getc(f);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1442:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int l = strlen(s);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1661:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t x = strlen(s);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1756:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1764:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1766:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1777:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1790:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1799:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1811:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1820:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1835:23:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1849:23:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1854:27:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                  c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1862:27:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                  c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1889:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1891:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1907:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1911:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ((c = io->fgetc(io)) != '|')
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1935:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1967:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1975:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1983:31:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                  int d = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:1997:23:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:2005:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:2024:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:2029:24:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          int nc = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:2038:23:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.cpp:2054:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int c = io->fgetc(io);
data/djvulibre-3.5.28/libdjvu/miniexp.h:578:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int (*fgetc)(miniexp_io_t*);
data/djvulibre-3.5.28/tools/csepdjvu.cpp:216:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  size_t read(void *buffer, size_t size);
data/djvulibre-3.5.28/tools/csepdjvu.cpp:242:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  bufend += bs.read(buffer+bufend, bufsize-bufend);
data/djvulibre-3.5.28/tools/csepdjvu.cpp:247:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
BufferByteStream::read(void *buf, size_t size)
data/djvulibre-3.5.28/tools/csepdjvu.cpp:254:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return bs.read(buf, size);
data/djvulibre-3.5.28/tools/csepdjvu.cpp:1439:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return (outbs) ? outbs->write((const void*)s, strlen(s)) : -1;
data/djvulibre-3.5.28/tools/ddjvu.cpp:608:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if (! (tempfilename = (char*)malloc(strlen(outputfilename) + 8)))
data/djvulibre-3.5.28/tools/ddjvu.cpp:940:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, opt, l);
data/djvulibre-3.5.28/tools/djvm.cpp:255:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   doc->read(url);
data/djvulibre-3.5.28/tools/djvm.cpp:272:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    for(int i=strlen(buffer);i<9;i++)
data/djvulibre-3.5.28/tools/djvumake.cpp:364:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  gbs->read(buffer,sizeof(buffer));
data/djvulibre-3.5.28/tools/djvumake.cpp:530:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  iff.write(fileid, strlen(fileid));
data/djvulibre-3.5.28/tools/djvused.cpp:141:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  size_t read(void *buffer, size_t size);
data/djvulibre-3.5.28/tools/djvused.cpp:165:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (bs.read(buffer+bufend,1) && ++bufend<(int)bufsize)
data/djvulibre-3.5.28/tools/djvused.cpp:174:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ParsingByteStream::read(void *buf, size_t size)
data/djvulibre-3.5.28/tools/djvused.cpp:181:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return bs.read(buf, size);
data/djvulibre-3.5.28/tools/djvused.cpp:266:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int len = read((void*)buffer, sizeof(buffer)-1);
data/djvulibre-3.5.28/tools/djvused.cpp:913:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while (!compat && mem->read(&c,1)>0)
data/djvulibre-3.5.28/tools/djvused.cpp:1792:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          out->write(msg1, strlen(msg1));
data/djvulibre-3.5.28/tools/djvused.cpp:1793:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          print_c_string(id, strlen(id), *out, utf8);
data/djvulibre-3.5.28/tools/djvused.cpp:1794:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if (pageno > 0) out->write(pagenumber, strlen(pagenumber));
data/djvulibre-3.5.28/tools/djvused.cpp:1795:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          out->write(msg2, strlen(msg2));
data/djvulibre-3.5.28/tools/djvused.cpp:1823:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      out->write(pre, strlen(pre));
data/djvulibre-3.5.28/tools/djvused.cpp:1848:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      out->write(pre, strlen(pre));
data/djvulibre-3.5.28/tools/djvused.cpp:1873:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      out->write(pre, strlen(pre));
data/djvulibre-3.5.28/tools/djvused.cpp:2349:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            g().cmdbs = ByteStream::create_static(argv[i],strlen(argv[i]));
data/djvulibre-3.5.28/tools/djvuserve.cpp:331:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int l = strlen(name);
data/djvulibre-3.5.28/tools/djvutxt.cpp:302:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
              strncpy(buf, opt, l);
data/djvulibre-3.5.28/tools/tiff2pdf.c:940:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				if (strlen(optarg) == 0) {
data/djvulibre-3.5.28/tools/tiff2pdf.c:945:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(t2p->pdf_datetime + 2, optarg,
data/djvulibre-3.5.28/tools/tiff2pdf.c:951:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(t2p->pdf_creator, optarg, sizeof(t2p->pdf_creator) - 1);
data/djvulibre-3.5.28/tools/tiff2pdf.c:955:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(t2p->pdf_author, optarg, sizeof(t2p->pdf_author) - 1);
data/djvulibre-3.5.28/tools/tiff2pdf.c:959:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(t2p->pdf_title, optarg, sizeof(t2p->pdf_title) - 1);
data/djvulibre-3.5.28/tools/tiff2pdf.c:963:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(t2p->pdf_subject, optarg, sizeof(t2p->pdf_subject) - 1);
data/djvulibre-3.5.28/tools/tiff2pdf.c:967:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(t2p->pdf_keywords, optarg, sizeof(t2p->pdf_keywords) - 1);
data/djvulibre-3.5.28/tools/tiff2pdf.c:1068:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len=strlen(papersize);
data/djvulibre-3.5.28/tools/tiff2pdf.c:2617:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			bufferoffset+=read;
data/djvulibre-3.5.28/tools/tiff2pdf.c:2665:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					samplebufferoffset+=read;
data/djvulibre-3.5.28/tools/tiff2pdf.c:2706:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			bufferoffset+=read;
data/djvulibre-3.5.28/tools/tiff2pdf.c:3151:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				samplebufferoffset+=read;
data/djvulibre-3.5.28/tools/tiff2pdf.c:3997:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(pdfstr);
data/djvulibre-3.5.28/tools/tiff2pdf.c:4195:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(t2p->pdf_datetime) > 0) {
data/djvulibre-3.5.28/tools/tiff2pdf.c:4211:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if(strlen(info) >= sizeof(t2p->pdf_creator))
data/djvulibre-3.5.28/tools/tiff2pdf.c:4226:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strlen(info) >= sizeof(t2p->pdf_author))
data/djvulibre-3.5.28/tools/tiff2pdf.c:4239:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if(strlen(info) > 511) {
data/djvulibre-3.5.28/tools/tiff2pdf.c:4253:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strlen(info) >= sizeof(t2p->pdf_subject))
data/djvulibre-3.5.28/tools/tiff2pdf.c:4310:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    && (strlen(datetime) >= 19) ){

ANALYSIS SUMMARY:

Hits = 592
Lines analyzed = 102802 in approximately 2.49 seconds (41232 lines/second)
Physical Source Lines of Code (SLOC) = 70699
Hits@level = [0] 168 [1] 222 [2] 275 [3]  25 [4]  61 [5]   9
Hits@level+ = [0+] 760 [1+] 592 [2+] 370 [3+]  95 [4+]  70 [5+]   9
Hits/KSLOC@level+ = [0+] 10.7498 [1+] 8.37353 [2+] 5.23345 [3+] 1.34372 [4+] 0.990113 [5+] 0.1273
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.