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/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmmontage.c
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmagick.h
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmpixel.c
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c
Parsing failed to find end of parameter list; semicolon terminated it in (opacity, sizeof(opacity),
#else
    sprintf(opacity,
#endif
            "%g,%g,%g,%g", red_pct_opaque*100.0, green_pct_opaque*100.0
            , blue_pct_opaque*100.0, alpha_pct_opaque*100.0);

    
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmenum.c
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c
Parsing failed to find end of parameter list; semicolon terminated it in (msg, sizeof(msg)-1, "RMagick: %s%s%s",
#else
        sprintf(msg, "RMagick: %.500s%s%.500s",
#endif
            GetLocaleExceptionMessage(exception->severity, exception->reason),
            exceptio
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmagick.c
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmilist.c
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmfill.c
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmmain.c
Examining data/ruby-rmagick-2.16.0/ext/RMagick/rmdraw.c

FINAL RESULTS:

data/ruby-rmagick-2.16.0/ext/RMagick/rmdraw.c:1337: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(tmpfile_name->name, name);
data/ruby-rmagick-2.16.0/ext/RMagick/rmdraw.c:1342:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    (void) sprintf(primitive, "image %s %g,%g,%g,%g '%s'", op, x, y, width, height, name);
data/ruby-rmagick-2.16.0/ext/RMagick/rmilist.c:1235: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(img->filename, info->filename);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:5285: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(info->magick, image->magick);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:5309: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(mi.magick, image->magick);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7408:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    x += sprintf(buffer+x, " %s ", image->magick);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:8338: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(info->filename, RSTRING_PTR(filename));
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:13537:5:  [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(opacity, sizeof(opacity),
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:13539:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(opacity,
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:15010: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(image->filename, info->filename);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:15020: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(image->filename, info->filename);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:771:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    (void) sprintf(ckey, "%s:%s", format, key);
data/ruby-rmagick-2.16.0/ext/RMagick/rmmain.c:1702:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(long_version,
data/ruby-rmagick-2.16.0/ext/RMagick/rmpixel.c:1088:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(buff, "red=" QuantumFormat ", green=" QuantumFormat ", blue=" QuantumFormat ", opacity=" QuantumFormat
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:373:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buff, "name=%s, compliance=%s, "
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:610:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buff, "name=%s, description=%s, "
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1670:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(msg, "RMagick: %.500s%s%.500s",
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1724:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(msg, "%.*s%s%.*s",
data/ruby-rmagick-2.16.0/ext/RMagick/rmmain.c:1625:9:  [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.
    if (getenv("SOURCE_DATE_EPOCH") != NULL) {
data/ruby-rmagick-2.16.0/ext/RMagick/rmagick.c:136: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 mode[4];
data/ruby-rmagick-2.16.0/ext/RMagick/rmagick.h:212: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 name[1]; /**< expandable char array for this filename */
data/ruby-rmagick-2.16.0/ext/RMagick/rmagick.h:265: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 magick[MaxTextExtent]; /**< magick string */
data/ruby-rmagick-2.16.0/ext/RMagick/rmdraw.c:988: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 geometry_str[50];
data/ruby-rmagick-2.16.0/ext/RMagick/rmdraw.c:1021:9:  [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(geometry_str, "%+ld%+ld", x, y);
data/ruby-rmagick-2.16.0/ext/RMagick/rmdraw.c:1027:9:  [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(geometry_str, "%lux%lu%+ld%+ld", width, height, x, y);
data/ruby-rmagick-2.16.0/ext/RMagick/rmdraw.c:1099: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 name[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rmdraw.c:1101: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 primitive[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rmenum.c:268: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 str[100];
data/ruby-rmagick-2.16.0/ext/RMagick/rmenum.c:272: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(str, "%.48s=%d", rb_id2name(magick_enum->id), magick_enum->val);
data/ruby-rmagick-2.16.0/ext/RMagick/rmfill.c:237: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(row_pixels, master, image->columns * sizeof(PixelPacket));
data/ruby-rmagick-2.16.0/ext/RMagick/rmfill.c:318: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(col_pixels, master, image->rows * sizeof(PixelPacket));
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:1575:18:  [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.
    sz = (size_t)sprintf(geometry, "%*.*f", -fw, prec, src_percent);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:1592:23:  [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.
        sz += (size_t)sprintf(geometry+sz, "x%*.*f", -fw, prec, dst_percent);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:1624: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 geometry[20];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:2832: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 opacity[50];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:2844:9:  [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(opacity, "%f/%f/%f", red, green, blue);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:2853:9:  [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(opacity, "%f/%f/%f/%f", red, green, blue, matte);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:3587: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 compose_args[200];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:3615:12:  [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.
    (void) sprintf(compose_args, "%-.16g,%-.16g,%-.16g,%-.16g", NUM2DBL(argv[1]), NUM2DBL(argv[2]), NUM2DBL(argv[3]), NUM2DBL(argv[4]));
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:4363: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 density[128];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:4367: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(density, "%gx%g", image->x_resolution, image->y_resolution);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:4652: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 auto_crop_width[20];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:4662: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(auto_crop_width, "%ld", width);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:6842: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 gamma_arg[50];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:6874: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(gamma_arg, "%f,%f,%f", red_gamma, green_gamma, blue_gamma);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7398:14:  [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.
        x += sprintf(buffer+x, "%.1024s=>", image->magick_filename);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7401:10:  [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.
    x += sprintf(buffer+x, "%.1024s", image->filename);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7405:14:  [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.
        x += sprintf(buffer+x, "[%lu]", image->scene);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7415:18:  [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.
            x += sprintf(buffer+x, "%lux%lu=>", image->magick_columns, image->magick_rows);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7419:10:  [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.
    x += sprintf(buffer+x, "%lux%lu ", image->columns, image->rows);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7425:14:  [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.
        x += sprintf(buffer+x, "%lux%lu%+ld%+ld ", image->page.width, image->page.height
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7431:14:  [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.
        x += sprintf(buffer+x, "DirectClass ");
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7436:22:  [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.
                x += sprintf(buffer+x, "%lumc ", image->total_colors/1024/1024);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7442:26:  [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.
                    x += sprintf(buffer+x, "%lukc ", image->total_colors/1024);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7446:26:  [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.
                    x += sprintf(buffer+x, "%luc ", image->total_colors);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7457:18:  [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.
            x += sprintf(buffer+x, "PseudoClass %ldc ", (long) image->colors);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7461:18:  [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.
            x += sprintf(buffer+x, "PseudoClass %lu=>%ldc ", image->total_colors
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7465:22:  [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.
                x += sprintf(buffer+x, "%ld/%.6f/%.6fdb "
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7475:10:  [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.
    x += sprintf(buffer+x, "%lu-bit", quantum_depth);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7482:18:  [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.
            x += sprintf(buffer+x, " %lumb", (unsigned long) (GetBlobSize(image)/1024/1024));
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7486:18:  [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.
            x += sprintf(buffer+x, " %lukb", (unsigned long) (GetBlobSize(image)/1024));
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7490:18:  [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.
            x += sprintf(buffer+x, " %lub", (unsigned long) GetBlobSize(image));
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7502:13:  [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(buffer+x, " user:");
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7506: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(buffer+x, value, value_l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7537: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 buffer[MaxTextExtent];          // image description buffer
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7670: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 level[50];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7697: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(level, "%gx%g+%g", black_point, white_point, gamma_val);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:8098: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(info->magick, ((DumpedImage *)blob)->magick, mi.len);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:8871: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 modulate[100];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:8894: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(modulate, "%f%%,%f%%,%f%%", pct_brightness, pct_saturation, pct_hue);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:10769: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(info->filename, filename, (size_t)filename_l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:13275: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 ctarg[200];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:13286: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(ctarg, "%f,%f,%f,%f", red, green, blue, opacity);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:13292: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(ctarg, "%f,%f,%f", red, green, blue);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:13297: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(ctarg, "%f,%f", red, green);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:13301: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(ctarg, "%f", red);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:13498: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 opacity[50];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:13669: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 name[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:14598: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 geometry[20];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:14906: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 magic[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:14919: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(info->filename, filename, (size_t)min(filename_l, MaxTextExtent-1));
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:14931: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(magic, filename, magic_l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:14958: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(info->filename, filename, (size_t)filename_l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:14968: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(info->filename, info->magick, prefix_l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:14972: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(info->filename+prefix_l, filename, (size_t)filename_l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:15369: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[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:15377: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.
            n = sprintf(buffer, "%p", (void *)image);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:173: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 buff[50];
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:190:19:  [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.
            len = sprintf(buff, "%-10ld", n);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:194:19:  [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.
            len = sprintf(buff, "%-10.2f", d);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:257: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 fkey[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:269: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(fkey, "%.60s:%.*s", format_p, (int)(MaxTextExtent-61), key_p);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:323: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 ckey[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:340:20:  [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.
            (void) sprintf(ckey, "%.60s:%.*s", format_p, (int)(sizeof(ckey)-MAX_FORMAT_LEN), key_p);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:747: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 ckey[100];
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:856: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 dstr[20];
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:873:9:  [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(dstr, "%d", delay);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:2011: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 buf[25];
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:2019:12:  [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.
    (void) sprintf(buf, "%-l", info->scene);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:2210: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 name[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:2362: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 fkey[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:2372: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(fkey, "%.60s:%.*s", format_p, (int)(MaxTextExtent-61), key_p);
data/ruby-rmagick-2.16.0/ext/RMagick/rmmain.c:1690: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 long_version[1000];
data/ruby-rmagick-2.16.0/ext/RMagick/rmmontage.c:436: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 temp_name[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rmpixel.c:497: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 name[50];
data/ruby-rmagick-2.16.0/ext/RMagick/rmpixel.c:548:9:  [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(name, "hsla(%-2.1f,%-2.1f,%-2.1f,%-2.1f)", h, s, l, a);
data/ruby-rmagick-2.16.0/ext/RMagick/rmpixel.c:552:9:  [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(name, "hsl(%-2.1f,%-2.1f,%-2.1f)", h, s, l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmpixel.c:993: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 name[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rmpixel.c:1085: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 buff[100];
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:212: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 buff[200];
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:215: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(buff, "red_primary=(x=%g,y=%g) "
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:369: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 buff[1024];
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:592: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 weight[20];
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:593: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 buff[1024];
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:600:13:  [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(weight, "NormalWeight");
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:603:13:  [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(weight, "BoldWeight");
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:606: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(weight, "%lu", ti.weight);
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:734: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 buff[100];
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:737: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(buff, "x=%g, y=%g, z=%g", pi.x, pi.y, pi.z);
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:818: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 buff[100];
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:821: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(buff, "width=%lu, height=%lu, x=%ld, y=%ld"
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:901: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 buff[100];
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:904: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(buff, "x1=%g, y1=%g, x2=%g, y2=%g"
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:1102: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 temp[200];
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:1107: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.
    len = sprintf(temp, "pixels_per_em=(x=%g,y=%g) ", tm.pixels_per_em.x, tm.pixels_per_em.y);
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:1109: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.
    len = sprintf(temp, "ascent=%g descent=%g ",tm.ascent, tm.descent);
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:1111: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.
    len = sprintf(temp, "width=%g height=%g max_advance=%g ", tm.width, tm.height, tm.max_advance);
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:1113: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.
    len = sprintf(temp, "bounds.x1=%g bounds.y1=%g ", tm.bounds.x1, tm.bounds.y1);
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:1115: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.
    len = sprintf(temp, "bounds.x2=%g bounds.y2=%g ", tm.bounds.x2, tm.bounds.y2);
data/ruby-rmagick-2.16.0/ext/RMagick/rmstruct.c:1117: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.
    len = sprintf(temp, "underline_position=%g underline_thickness=%g", tm.underline_position, tm.underline_thickness);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:631: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 name[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:726: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(temp_name, "mpri:%d", id);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:967: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 property[MaxTextExtent];
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1223: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(str+len, property+5, property_l-5);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1230:17:  [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(str+len, value, value_l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1312: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(str+len, property, property_l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1319:17:  [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(str+len, value, value_l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1605: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[500];
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1613: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.
    len = sprintf(msg, "%.250s: `%.240s'", reason, description);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1657: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 reason[500];
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1658: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 desc[500];
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1659: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[sizeof(reason)+sizeof(desc)+20];
data/ruby-rmagick-2.16.0/ext/RMagick/rmdraw.c:1336:62:  [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).
    tmpfile_name = magick_malloc(sizeof(struct TmpFile_Name)+strlen(name));
data/ruby-rmagick-2.16.0/ext/RMagick/rmilist.c:1141:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(img->magick, info->magick, sizeof(info->magick)-1);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:518:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(info->filename, profile_filename, min((size_t)profile_filename_l, sizeof(info->filename)));
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:2625:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(info->magick, m->name, MaxTextExtent);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:5310:53:  [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).
    mi.len = (unsigned char) min((size_t)UCHAR_MAX, strlen(mi.magick));
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:5909:36:  [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).
    npixels = (long)(cols * rows * strlen(map));
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:6088: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).
    npixels = cols * rows * strlen(map);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:6506:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(image->magick, m->name, MaxTextExtent-1);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7252: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).
    map_l = strlen(map);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:7505: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).
            value_l = min(strlen(value), value_l);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:13608:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(image->magick, info->magick, sizeof(info->magick)-1);
data/ruby-rmagick-2.16.0/ext/RMagick/rmimage.c:14967:46:  [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).
    prefix_l = min(sizeof(info->filename)-1, strlen(info->magick));
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:273:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(fkey, StringValuePtr(argv[0]), sizeof(fkey)-1);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:346:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(ckey, StringValuePtr(argv[0]), sizeof(ckey)-1);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:1276:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(info->filename, fname, MaxTextExtent);
data/ruby-rmagick-2.16.0/ext/RMagick/rminfo.c:1416:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(info->magick, m->name, MaxTextExtent-1);
data/ruby-rmagick-2.16.0/ext/RMagick/rmmontage.c:194:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(montage->info->filename, StringValuePtr(filename), MaxTextExtent-1);
data/ruby-rmagick-2.16.0/ext/RMagick/rmpixel.c:383:18:  [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.
    unsigned int equal;
data/ruby-rmagick-2.16.0/ext/RMagick/rmpixel.c:427: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.
    return equal ? Qtrue : Qfalse;
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:976:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(property, value, MaxTextExtent);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1185: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).
        property_l = strlen(property);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1197: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).
                len += 1 + strlen(value);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1216: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).
        property_l = strlen(property);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1228: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).
                value_l = strlen(value);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1274: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).
        property_l = strlen(property);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1286: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).
                len += 1 + strlen(value);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1305: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).
        property_l = strlen(property);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1317: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).
                value_l = strlen(value);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1708:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(reason, exception->reason, sizeof(reason)-1);
data/ruby-rmagick-2.16.0/ext/RMagick/rmutil.c:1713:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(desc, exception->description, sizeof(desc)-1);

ANALYSIS SUMMARY:

Hits = 172
Lines analyzed = 31234 in approximately 0.66 seconds (47328 lines/second)
Physical Source Lines of Code (SLOC) = 17146
Hits@level = [0]   5 [1]  30 [2] 123 [3]   1 [4]  18 [5]   0
Hits@level+ = [0+] 177 [1+] 172 [2+] 142 [3+]  19 [4+]  18 [5+]   0
Hits/KSLOC@level+ = [0+] 10.3231 [1+] 10.0315 [2+] 8.28182 [3+] 1.10813 [4+] 1.04981 [5+]   0
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.