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/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/projapprox.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/misc.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/data.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/weight.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcscelsys.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/weight.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/types.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/define.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/threads.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/preflist.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/misc.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/projapprox.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/main.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/threads.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/data.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/interpolate.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/interpolate.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/key.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/tnx.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcstrig.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/proj.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/lin.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/lin.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/poly.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/sph.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/proj.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/tnx.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/cel.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcstrig.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/poly.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcsmath.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/cel.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/sph.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/globals.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsread.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsconv.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsmisc.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitstab.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat_defs.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscleanup.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscheck.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/back.h Examining data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/back.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_spc_wcal.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_std_cat.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_convert_weight.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_spc_obs.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_clip_body.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_chain.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_txt2fits.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_combine.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_img_std_cat.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_join.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_dark.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_repack.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_spc_obs_ech.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_spc_phot.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_phot.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_qc.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_spc_wcal_ech.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_clip.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_destripe.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/tests/recipe_main.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/tests/visir_recipes_test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/tests/visir_recipes_test.h Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_apply_calib.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_undistort.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_spc_phot_ech.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_trans.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_ff.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_spc_chain.c Examining data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_recipe.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_distortion.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_oddeven.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_polynomial.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_stdstar.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_flat.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_calib.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wavecal.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_ksigma_clip.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_slitpos.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wcs.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_calib.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_polynomial.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_hist.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wlxcorr.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_fft.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_ppm.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_slitpos.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_mkmaster.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_ksigma_clip_body.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_cat.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_match_cats.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_spectrum.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_oddeven.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_utils.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wcs.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wlxcorr.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wavecal.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_spectrum.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_flat.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_cat-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_utils-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_sdp_spectrum-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_wlxcorr-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_strehl-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_plugin-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_hist-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_framelist-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_wcs-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_polynomial-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_stdstar.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_ppm.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_strehl.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wavecal_impl.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_cat.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_strehl.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_utils.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_fft.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_match_cats.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_mkmaster.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_distortion.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_ksigma_clip.h Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_hist.c Examining data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c Examining data/cpl-plugin-visir-4.3.10+dfsg/reflex/header.h Examining data/cpl-plugin-visir-4.3.10+dfsg/reflex/wkf_oca.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_destripe.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spc_optmod.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_pfits.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spc_distortion.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_dfs.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_parameter.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_inputs.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_queue.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_serialize.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_inputs.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spc_optmod.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spc_distortion.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_destripe.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_destripe_body.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_parameter.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spectro.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/irplib_pfits.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spc_photom.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_cpl_compat.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_queue-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_inputs-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_imglist-test.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spc_photom.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_dfs_dpr.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_pfits.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spectro.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_imglist.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_dfs.h Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/irplib_pfits.c Examining data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.h FINAL RESULTS: data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_cat.c:89:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access((const char *)fname,R_OK) != 0) data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:1052:13: [4] (buffer) sscanf: 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. n = sscanf(line, LINE_SCAN_FMT, path, tag, group); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_utils.c:68:30: [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/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wcs.c:252:12: [4] (buffer) sscanf: 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. nret = sscanf(iso8601, IRPLIB_ISO8601_FORMAT, pyear, pmonth, data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wlxcorr.c:990:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(title_loc, data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wlxcorr.c:1023:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(title_loc, data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_utils-test.c:482:19: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. cpl_test_zero(system("rm dummyon*.fits")); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_chain.c:328:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. int ret = system(VISIR_SWARP_BIN " -v > /dev/null 2>/dev/null"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c:1023:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffer, RECIPE_STRING"_%03d_%s"CPL_DFS_FITS, data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c:1404:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffer, RECIPE_STRING"_bpm_%03d_%s"CPL_DFS_FITS, data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c:1423:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffer, RECIPE_STRING"_template_%03d"CPL_DFS_FITS, data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c:1451:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffer, RECIPE_STRING"_%03d_%s"CPL_DFS_FITS, data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_img_std_cat.c:285:13: [4] (buffer) sscanf: 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. nvals = sscanf(line, format, data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:132:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. int ret = system(VISIR_SWARP_BIN " -v > /dev/null 2>/dev/null"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:262:22: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. int status = system(cmd); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:322:22: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. int status = system(cmd); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:377:18: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. status = system(cmd); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:397:18: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. status = system(cmd); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:401:22: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. status = system(cmd); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:450:14: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. status = system(cmd); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:848:14: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. error_if(access(config, R_OK) != 0, CPL_ERROR_FILE_NOT_FOUND, data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:146:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(compressedFilename, "!%s.fz[compress]", outfield->cat->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:186:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outfield->cat->filename, "%s.tmp", outfield->cat->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/define.h:116:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(gstr, #ptr " (" #nel " elements=%zu bytes) " \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/define.h:126:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(gstr, #ptr " (" #nel " elements=%zu bytes) " \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/define.h:136:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(gstr, #ptr " (" #nel " elements=%zu bytes) " \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/define.h:147:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(gstr, #ptrout " (" #nel " elements=%zu bytes) " \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/define.h:158:50: [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. #define NPRINTF if (prefs.verbose_type == NORM) fprintf data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/define.h:165:50: [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. #define FPRINTF if (prefs.verbose_type == FULL) fprintf data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:85: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(field->cat->filename, cat->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:86: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 (field->filename, cat->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:101: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(field->hfilename, field->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:104:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pstr, "%s", prefs.head_suffix); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:106:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gstr, "Looking for %s ...", field->rfilename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:226: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(field->filename, filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:227: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(field->cat->filename, filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:389: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 (field->filename, filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:396: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(field->hfilename, filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:399:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pstr, "%s", prefs.head_suffix); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:403: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(field->cat->filename, field->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:753: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(wcs->ctype[lng]+5, prefs.projection_name); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:754: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(wcs->ctype[lat]+5, prefs.projection_name); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:122:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tab->swapname, "%s/vm%05ld_%05x.tmp", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:224:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tab->swapname, "%s/vm%05ld_%05x.tmp", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:1334: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(body_swapdirname, dirname); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.c:138:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str2, "%s %.65s", str2, str); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:133:9: [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. char printf[80]; /* printing format (C Convention) */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat_defs.h:129:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(gstr, #ptr " (" #nel "=%zu elements) " \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat_defs.h:139:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(gstr, #ptr " (" #nel "=%zu elements) " \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat_defs.h:149:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(gstr, #ptr " (" #nel "=%zu elements) " \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat_defs.h:160:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(gstr, #ptrout " (" #nel "=%zu elements) " \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat_defs.h:172:29: [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. #define QPRINTF if (qflag) fprintf data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscleanup.c:99: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(cleanup_filename[cleanup_nfiles++], filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsconv.c:106: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(key->comment, comment+strspn(comment, " ")); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsconv.c:123:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(comment, "%s keyword found twice in ", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:287:39: [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. fitsread(tab->headbuf, strk, key->printf, H_STRING, T_STRING); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:288:15: [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. if (*key->printf) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:289:26: [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. tdisptoprintf(key->printf, key->printf); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:289:39: [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. tdisptoprintf(key->printf, key->printf); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:458:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str2, n?", %d%n":"%d%n", key->naxisn[n],&j); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:470:15: [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. if (*key->printf) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:474:56: [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. fitswrite(tab->headbuf, strk, printftotdisp(key->printf, str), data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:197: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(key->name, keyname); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:529: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(names[i],key->name); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:684:15: [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(stream, skycathead, 6.0); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:698:8: [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(key->name, map->newname); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:737:15: [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(key->name, map->newname); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:825:20: [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(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:825:42: [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. fprintf(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:825:54: [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. fprintf(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:845:20: [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(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:845:42: [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. fprintf(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:845:54: [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. fprintf(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:866:20: [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(stream, *key->printf?key->printf:"%lld", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:866:42: [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. fprintf(stream, *key->printf?key->printf:"%lld", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:866:54: [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. fprintf(stream, *key->printf?key->printf:"%lld", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:869:20: [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(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:869:42: [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. fprintf(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:869:54: [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. fprintf(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:889:21: [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(stream, *key->printf?key->printf:"%g", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:889:43: [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. fprintf(stream, *key->printf?key->printf:"%g", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:889:55: [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. fprintf(stream, *key->printf?key->printf:"%g", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:909:20: [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(stream, *key->printf?key->printf:"%f", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:909:42: [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. fprintf(stream, *key->printf?key->printf:"%f", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:909:54: [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. fprintf(stream, *key->printf?key->printf:"%f", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:940:22: [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(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:940:44: [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. fprintf(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:940:56: [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. fprintf(stream, *key->printf?key->printf:"%d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsread.c:60: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(cat->filename, filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsread.c:98: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(ccat->filename, *filenames); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitstab.c:446: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(tab->extname, tabname); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitstab.c:709: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(names[i],tab->extname); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:413:21: [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). case H_COMMENT: strcpy(ptr,str+9); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:416:22: [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). case H_HCOMMENT: strcpy(ptr,str+33); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:558:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "'%s'", str2); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:564:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. case H_COMMENT: sprintf(str, "%-70s", (char *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:569:22: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. case H_HCOMMENT: sprintf(str, " / %-47s", (char *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:59: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(cat->filename, filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:418: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(stream, *key->printf?key->printf:"%g", *(float *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:418:33: [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. fprintf(stream, *key->printf?key->printf:"%g", *(float *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:418:45: [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. fprintf(stream, *key->printf?key->printf:"%g", *(float *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:423: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(stream, *key->printf?key->printf:"%f", *(double *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:423:33: [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. fprintf(stream, *key->printf?key->printf:"%f", *(double *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:423:45: [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. fprintf(stream, *key->printf?key->printf:"%f", *(double *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:428: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(stream, *key->printf?key->printf:"%d", *(short *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:428:33: [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. fprintf(stream, *key->printf?key->printf:"%d", *(short *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:428:45: [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. fprintf(stream, *key->printf?key->printf:"%d", *(short *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:433: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(stream, *key->printf?key->printf:"%d", *(int *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:433:33: [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. fprintf(stream, *key->printf?key->printf:"%d", *(int *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:433:45: [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. fprintf(stream, *key->printf?key->printf:"%d", *(int *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:438: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(stream, *key->printf?key->printf:"%lld", *(SLONGLONG *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:438:33: [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. fprintf(stream, *key->printf?key->printf:"%lld", *(SLONGLONG *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:438:45: [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. fprintf(stream, *key->printf?key->printf:"%lld", *(SLONGLONG *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:451: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(stream, key->printf?key->printf:"%d", (int)*ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:451:34: [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. fprintf(stream, key->printf?key->printf:"%d", (int)*ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:451:46: [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. fprintf(stream, key->printf?key->printf:"%d", (int)*ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:504: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(stream, *key->printf?key->printf:"%g", *(float *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:504:33: [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. fprintf(stream, *key->printf?key->printf:"%g", *(float *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:504:45: [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. fprintf(stream, *key->printf?key->printf:"%g", *(float *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:509: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(stream, *key->printf?key->printf:"%f", *(double *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:509:33: [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. fprintf(stream, *key->printf?key->printf:"%f", *(double *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:509:45: [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. fprintf(stream, *key->printf?key->printf:"%f", *(double *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:514: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(stream, *key->printf?key->printf:"%d", *(short *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:514:33: [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. fprintf(stream, *key->printf?key->printf:"%d", *(short *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:514:45: [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. fprintf(stream, *key->printf?key->printf:"%d", *(short *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:519: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(stream, *key->printf?key->printf:"%d", *(int *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:519:33: [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. fprintf(stream, *key->printf?key->printf:"%d", *(int *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:519:45: [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. fprintf(stream, *key->printf?key->printf:"%d", *(int *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:524: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(stream, *key->printf?key->printf:"%lld", *(SLONGLONG *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:524:33: [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. fprintf(stream, *key->printf?key->printf:"%lld", *(SLONGLONG *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:524:45: [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. fprintf(stream, *key->printf?key->printf:"%lld", *(SLONGLONG *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:537: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(stream, key->printf?key->printf:"%d", (int)*ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:537:34: [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. fprintf(stream, key->printf?key->printf:"%d", (int)*ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:537:46: [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. fprintf(stream, key->printf?key->printf:"%d", (int)*ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:351:6: [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(str, (def)); \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:1186: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(strlng, wcs->ctype[olng]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:1187: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(strlat, wcs->ctype[olat]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:1188: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(wcs->ctype[lng], strlng); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:1189: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(wcs->ctype[lat], strlat); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:170:6: [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(str, (def)); \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/main.c:97:15: [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(prefs.prefs_name, argv[++a]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:123:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gstr, "*Error*: %s not found", prefs.infield_name[i]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:142:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gstr, "*Error*: %s not found", prefs.inwfield_name[i]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:289:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gstr, "Reading %s ...", inwfield[k]->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:294:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gstr, "Reading %s", infield[k]->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:298:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gstr, "Resampling %s ...", infield[k]->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:462:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(error, "%s%s", msg1,msg2); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:113: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(keylist[i], key[i].name); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:131: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(str, *(dp++)+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:133: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(str, *(dp++)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:146:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s %s", argkey[argi], argval[argi]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:231:13: [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((char *)key[nkey].ptr, value); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:348:15: [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(((char **)key[nkey].ptr)[i], value); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:462: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(listbuf+bufpos, str); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:599: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(prefs.inwfield_name[i], prefs.infield_name[i]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:602:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pstr, "%s", prefs.weight_suffix); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:640:8: [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(prefs.inwfield_name[i],prefs.inwfield_name[0]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:729: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(prefs.image_center[i], prefs.image_center[prefs.nimage_center-1]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:134: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(filename2, infield->rfilename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:144:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s.%04d%s", prefs.resampdir_name, filename2, data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:147:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s%s", prefs.resampdir_name, filename2, data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:165: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(field->ident, infield->ident); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:215: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(resampext1, prefs.resamp_suffix); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:219: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(resampext2, pstr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:225:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s.%04d%s.weight%s", prefs.resampdir_name, filename2, data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:229:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s%s.weight%s", prefs.resampdir_name, filename2, data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:505:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(requir, "DEC--%s", wcs->pcode); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:511:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(requir, "RA---%s", wcs->pcode); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:517:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(requir, "%s-%s", wcs->lattyp, wcs->pcode); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:523:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(requir, "%s-%s", wcs->lngtyp, wcs->pcode); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/weight.c:111: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 (wfield->filename, cat->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/weight.c:118:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gstr, "Looking for %s ...", wfield->rfilename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/weight.c:126: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(wfield->cat->filename, wfield->filename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:114: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(x->ext_date, field->sdate_end); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:115: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(x->ext_time, field->stime_end); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:117: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(x->ident, field->ident); data/cpl-plugin-visir-4.3.10+dfsg/visir/irplib_pfits.h:112:28: [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/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:172: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(tmpdir, tmpdir_); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:183: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(tmpdir_, tmpdir); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:512:29: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (WEXITSTATUS(system(buf)) != 0) { data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:904:25: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (WEXITSTATUS(system(cmd)) != 0) data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:931:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmpdir, "%s_XXXXXX", recipename); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:997:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmpdir, "%s_XXXXXX", recipename); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:552:17: [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("CPL_MSG_LEVEL") == NULL) cpl_msg_set_level(CPL_MSG_OFF); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:650: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. svalue = envvar ? getenv(envvar) : NULL; data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:857: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. const char * sof_path = envname ? getenv(envname) : NULL; data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:898:29: [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 * sof_path = getenv(var_name); data/cpl-plugin-visir-4.3.10+dfsg/recipes/tests/recipe_main.c:190: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("RECIPE_UNIT_TEST") != NULL && data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_chain.c:103: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. char * progname = getenv("_"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_chain.c:104: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. char * classpath = getenv("CLASSPATH"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_chain.c:113:36: [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 (ESO_COVERAGE_BUILD || getenv("VISIR_NO_FORK") != NULL) { data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_chain.c:330:29: [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/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_spc_chain.c:96: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. char * progname = getenv("_"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_spc_chain.c:97: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. char * classpath = getenv("CLASSPATH"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_spc_chain.c:106:36: [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 (ESO_COVERAGE_BUILD || getenv("VISIR_NO_FORK") != NULL) { data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:251:14: [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 (!(pstr=getenv("USERNAME"))) /* Cygwin,... */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:252:15: [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 ((pstr=getenv("LOGNAME"))) /* Linux,... */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:430:14: [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 (!(pstr=getenv("USERNAME"))) /* Cygwin,... */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:431:15: [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 ((pstr=getenv("LOGNAME"))) /* Linux,... */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:181: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. if (!(envval=getenv(envname))) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:277:16: [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 (!(psuser=getenv("USERNAME"))) /* Cygwin,... */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:278:14: [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. psuser = getenv("LOGNAME"); /* Linux,... */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:279:12: [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. pspath = getenv("PWD"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:280:12: [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. pshost = getenv("HOSTNAME"); data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:112:29: [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 * orig = getenv("OMP_NUM_THREADS"); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:125:31: [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 (force == CPL_FALSE && getenv("OMP_NUM_THREADS")) { data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:126:32: [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. char * endptr, * str = getenv("OMP_NUM_THREADS"); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:720: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("VISIR_TEST_MODE")) { data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:2390:25: [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. cpl_fft_mode mode = getenv("VISIR_TEST_MODE") ? 0 : CPL_FFT_FIND_MEASURE; data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_cat.c:287: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 fullname[FILENAME_SZBUF]; data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:493:34: [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). stream = is_debug ? stdout : fopen("/dev/null", "a"); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:655:28: [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). = svalue ? atoi(svalue) : cpl_parameter_get_default_bool(p); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:661:28: [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). = svalue ? atoi(svalue) : cpl_parameter_get_default_int(p); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:1030: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 line[LINE_LEN_MAX + 1]; data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:1031: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 path[LINE_LEN_MAX + 1], group[LINE_LEN_MAX + 1], tag[LINE_LEN_MAX + 1]; data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_plugin.c:1037:10: [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). fp = fopen(name, "r"); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_utils.c:1010:18: [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). stream = fopen(rawfile, "r"); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_wlxcorr.c:973: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 title_loc[1024] ; data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_utils-test.c:130: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 zero[100] = {0}; data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_utils-test.c:168: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[32] = ""; data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_utils-test.c:256: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). file = fopen(filename1, "w"); data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_utils-test.c:260: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). file = fopen(filename2, "w"); data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_wlxcorr-test.c:134:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_chain.c:350: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[128]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_chain.c:367: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(buffer, "visir_img_phot_%03d.fits", idx); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_phot.c:179: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 star_name[IRPLIB_FITS_STRLEN+1]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_phot.c:180: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 filter[IRPLIB_FITS_STRLEN+1]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_phot.c:2244: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[100]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_phot.c:2245: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(buffer, "ESO QC FLUXSNR RADIUS%d", i + 1); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_apply_calib.c:287: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[300]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_apply_calib.c:308: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(buffer, "visir_calibrated_%03d.fits", i + 1); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_apply_calib.c:379: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[300]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_apply_calib.c:380: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(buffer, "visir_result_%03d.fits", i + 1); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_apply_calib.c:468: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(cpl_bivector_get_x_data(intstd), data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_apply_calib.c:471: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(cpl_bivector_get_x_data(intstde), data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_apply_calib.c:561: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[300]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_apply_calib.c:572: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(buffer, "visir_calibrated_%03d.fits", i + 1); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c:977: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[128]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c:1401: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[128]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c:1421: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[128]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c:1437: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[128]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c:1443: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, "%01d", bi->type); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_detect_shift.c:1445: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, "UNDEFINED"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_img_std_cat.c:123: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 line[1024]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_img_std_cat.c:125: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 sname[512]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_img_std_cat.c:126: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 stype[512]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_img_std_cat.c:171: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). in = fopen(filename, "r"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_qc.c:164: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 filename[128]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_qc.c:165: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(filename, "qc_header_%03d.fits", iframe); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:218: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 datafile[128]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:219: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 errorfile[128]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:229: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(datafile, "swarp_data_%d.list", (int)cpid); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:230: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(errorfile, "swarp_error_%d.list", (int)cpid); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:232:23: [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 * data = fopen(datafile, "w"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:243:24: [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 * error = fopen(errorfile, "w"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:420:19: [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 * data = fopen(SWARP_DATA_FILES, "w"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c: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 coadd_img[200]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:544: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 coadd_wgt[200]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:546: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(coadd_img, "tmp_coadd_%d.fits", (int)pids[j]); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:547: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(coadd_wgt, "tmp_coadd_wgt_%d.fits", (int)pids[j]); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:559: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(coadd_img, "swarp_coadd_img_%03d.fits", (int)j); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:560: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(coadd_wgt, "swarp_coadd_wgt_%03d.fits", (int)j); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:599: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 coadd_img[200]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:600: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 coadd_wgt[200]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:604: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(coadd_img, "tmp_coadd_%d.fits", (int)pids[j]); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_run_swarp.c:605: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(coadd_wgt, "tmp_coadd_wgt_%d.fits", (int)pids[j]); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_std_cat.c:114: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 line[1024]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_std_cat.c:174:19: [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 ((in = fopen(filename, "r")) == NULL) { data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_std_cat.c:235: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(star_arr[i], fstart, ilen); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_txt2fits.c:148: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 extname[FLEN_VALUE]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_txt2fits.c:166:18: [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). stream = fopen(filename, "r"); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_txt2fits.c:301: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 line[1024]; data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_txt2fits.c:306: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 value[FLEN_VALUE]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/back.c:745: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(back, back2, (size_t)np*sizeof(float)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/back.c:788: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(back, back2, np*sizeof(float)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/back.c:791: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(sigma, sigma2, np*sizeof(float)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:81: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 padbuf[FBSIZE]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:145: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 compressedFilename[strlen(outfield->cat->filename) + 20]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:217: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 card[81]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:518: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). if(!(cliplog = fopen(prefs.clip_logname,"w"))) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:750: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(outiline+offbeg, ipix, outwidth*sizeof(FLAGTYPE)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:761: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(outline+offbeg, pix, outwidth*sizeof(PIXTYPE)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:791: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(outiline+offbeg, wipix, outwidth*sizeof(PIXTYPE)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:803: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(outline+offbeg, wpix, outwidth*sizeof(PIXTYPE)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:1396: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(pixstackbuf, pixstack, sizeof(PIXTYPE)*coadd_nomax); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/define.h:152:18: [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(ptrout, ptrin, (size_t)(nel)*sizeof(typ)); \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:134: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(gstr, "CTYPE%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:283: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 stra[16], strd[16]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:291: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(gstr, "Extension #%d:", field->frameno); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:379: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 *ctype[NAXIS], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:472:9: [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(ctype[lng], "PIXEL"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:473:9: [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(ctype[lat], "PIXEL"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.h:55: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 filename[MAXCHAR]; /* image filename */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.h:57: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 hfilename[MAXCHAR]; /* header filename */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.h:59: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 ident[80]; /* field identifier (read from FITS) */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.h:108: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 sdate_end[12]; /* SWarp end date */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.h:109: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 stime_end[12]; /* SWarp end time */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:59:1: [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 body_swapdirname[MAXCHARS] = BODY_DEFSWAPDIR; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:125:16: [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 (!(file=fopen(tab->swapname, "wb+"))) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:227:16: [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 (!(file=fopen(tab->swapname, "wb+"))) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:645: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(&val16, bufdata, 2); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:652: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(&dval,bufdata,4); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:692: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(&val16, bufdata, 2); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:834: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(&val16, bufdata, 2); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:841: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(&dval,bufdata,4); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsbody.c:881: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(&val16, bufdata, 2); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.c:118: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 str2[82]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.c:315: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(tab->headbuf, bintabtemplate, sizeof(bintabtemplate)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.c:472: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). if ((cat->file = fopen(cat->filename, at==WRITE_ONLY?"wb":"rb")) == NULL) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:128: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 name[80]; /* name */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:129: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 comment[80]; /* a comment */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:133: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 printf[80]; /* printing format (C Convention) */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:134: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 unit[80]; /* physical unit */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:135: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 voucd[80]; /* VO ucd */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:136: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 vounit[80]; /* VO unit */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:152: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 filename[MAXCHARS]; /* file name */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:182: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 xtension[82]; /* FITS extension type */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:183: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 extname[82]; /* FITS extension name */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat.h:196: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 swapname[MAXCHARS]; /* name of the swapfile */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat_defs.h:89:1: [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 gstr[MAXCHAR]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscat_defs.h:165:20: [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(ptrout, ptrin, (size_t)(nel)*sizeof(typ)); \ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscheck.c:105: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 cbuf[16]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscheck.c:227: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, (char *)tab->bodybuf+tab->tabsize-size, size); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscheck.c:269: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 str[32], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitscheck.c:289: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(str, "%u", sum); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsconv.c:64: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 comment[82], keyword[16], ptr[82]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsconv.c:94: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 line[81]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:109: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 str[88]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:110: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 key[12], name[16], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:115:46: [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. filename = (tab->cat? tab->cat->filename : strcpy(name, "internal header")); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:118: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 NAXIS_KEYWORD[14]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:119: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 BITPIX_KEYWORD[14]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:125:11: [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(NAXIS_KEYWORD, "ZNAXIS "); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:126:11: [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(BITPIX_KEYWORD, "ZBITPIX "); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:131:11: [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(NAXIS_KEYWORD, "NAXIS "); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:132:11: [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(BITPIX_KEYWORD, "BITPIX "); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:158:16: [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(key,"ZNAXIS%-2d", (i+1)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:160:16: [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(key,"NAXIS%-3d", (i+1)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:217:34: [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). tab->bodysum = (unsigned int)atoi(str); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:238: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 strf[88], strk[16]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:276: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(strk, "TTYPE%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:284: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(strk, "TUNIT%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:286: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(strk, "TDISP%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:291: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(strk, "TFORM%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:323: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(strk, "TDIM%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:370: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 strk[88], str[88]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:392: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(strk, "NAXIS%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:440: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(strk, "TTYPE%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:443: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(strk, "TFORM%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:451: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(strk, "TDIM%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:466: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(strk, "TUNIT%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:472: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(strk, "TDISP%-3d", i+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:487: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(str, "%u", tab->bodysum); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:692: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(str, "%d%c", n, t); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:777: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 control[4]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:791: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(str, "%%%dc",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:794: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(str, "%%%dd",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:798: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(str, "%%%d.%dd",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:800: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(str, "%%%dd",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:804: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(str, "%%%d.%dx",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:806: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(str, "%%%dx",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:810: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(str, "%%%d.%do",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:812: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(str, "%%%do",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:816: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(str, "%%%d.%df",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:818: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(str, "%%%df",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:822: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(str, "%%%d.%dE",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:824: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(str, "%%%dE",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:828: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(str, "%%%d.%dG",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:830: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(str, "%%%dG",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:877: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(str, "A%d",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:880: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(str, "A%d",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:884: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(str, "I%d.%d",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:886: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(str, "I%d",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:890: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(str, "O%d.%d",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:892: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(str, "O%d",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:896: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(str, "Z%d.%d",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:898: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(str, "Z%d",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:902: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(str, "F%d.%d",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:904: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(str, "F%d",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:908: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(str, "E%d.%d",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:910: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(str, "E%d",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:914: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(str, "G%d.%d",w,d); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:916: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(str, "G%d",w); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:606: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 oldname[80]; /* Name of the original pipeline key */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:607: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 newname[80]; /* Name of the skycat required key */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:665:24: [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). key_col[i] = atoi(++t); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitskey.c:814: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. ptr = memcpy(rfield, buf+key->pos, key->nbytes); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsmisc.c:44: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 warning_historystr[WARNING_NMAX][192]={""}; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsmisc.c:89: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(warning_historystr[(nwarning++)%WARNING_NMAX], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsread.c:41:1: [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 padbuf[FBSIZE]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitstab.c:445:3: [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(tab->xtension, "BINTABLE"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitstab.c:457: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(tab->headbuf, bintabtemplate, sizeof(bintabtemplate)); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:61: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 str[82]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:79: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(str, "NAXIS%-3d", i); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:116: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(str, "%-8.8s %-71.71s", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:119: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(str, "%-8.8s= / %-47.47s", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:122: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(str, "%-8.8s= %-47.47s", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:124: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(key_ptr, str, 80); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:208: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(keyword, fitsline, 8); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:282:23: [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 *)ptr) = atoi(fitsline+j); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:344: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 s[4], str[82]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:481: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 str[81],str2[81]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:494: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(str, "%20d", *(int *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:496: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(str, "%20d", *(short *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:499: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(str, "%20lld", *(SLONGLONG *)ptr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:503: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. case H_FLOAT: sprintf(str, " %16.8f", (ttype==T_DOUBLE)? data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:507: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. case H_EXPO: sprintf(str, " %19.12E", (ttype==T_DOUBLE)? data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:513: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(str, " T"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:515: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(str, " F"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:531: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(str, "'%-18.18s ", str2); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:537: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(str, "'%-68.68s ", str2); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitswrite.c:256: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. static char padbuf[FBSIZE]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:353: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 str[MAXCHARS]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:354: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 wstr1[TNX_MAXCHARS], wstr2[TNX_MAXCHARS]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:359: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[16], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:363:46: [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. filename = (tab->cat? tab->cat->filename : strcpy(name, "internal header")); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:381: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, "CTYPE%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:384: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, "CUNIT%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:387: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, "CRVAL%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:389: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, "CRPIX%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:391: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, "CDELT%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:393: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, "CRDER%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:395: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, "CSYER%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:407: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(str, "CD%d_%d", l+1, j+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:415: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(str, "PC%d_%d", l+1, j+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:424: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(str, "PC%03d%03d", l+1, j+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:466:21: [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). dpar[l] = atoi(pstr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:544: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(str, "WAT1_001"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:547: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(str, "WAT1_%03d", j); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:551: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(str, "WAT2_001"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:554: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(str, "WAT2_%03d", j); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:592: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(str, "PROJP%-3d", j); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:600: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(str, "PV%d_%d ", l+1, j); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:636: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 str[MAXCHARS]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:646: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, "NAXIS%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:681: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, "CTYPE%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:684: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, "CUNIT%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:687: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, "CRVAL%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:690: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, "CRPIX%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:695: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(str, "CD%d_%d", l+1, j+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:702: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(str, "PV%d_%d", l+1, j); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:765: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 projcode[28][5] = data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:1173: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 strlng[80], strlat[80]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:2041: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(str,"%02d:%02d:%05.2f", hh, mm, ss); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:2068: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(str,"%c%02d:%02d:%04.1f", sign, dd, dm, ds); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.h:65: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 ctype[NAXIS][9]; /* FITS CTYPE strings */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.h:66: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 cunit[NAXIS][32]; /* FITS CUNIT strings */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/globals.h:32:1: [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 gstr[MAXCHAR]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:68: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. static char keyword[MAXCHAR],data[MAXCHAR],comment[MAXCHAR]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:75: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). if ((file=fopen(filename, "r"))) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:182: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(gstr, "COMIN%-3d", l+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:223: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 comment[88], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:268: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(gstr,"%04d-%02d-%02dT%02d:%02d:%02d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:303: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(gstr, "RESAMPT%1d", d+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:308: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(gstr, "CENTERT%1d", d+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:313: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(gstr, "PSCALET%1d", d+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:327: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(gstr, "FILE%04d", n+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:338: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(gstr, "WGHT%04d", n+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:347: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(gstr, "WGTT%04d", n+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:353: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(gstr, "INTF%04d", n+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:357: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(gstr, "SUBF%04d", n+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:361: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(gstr, "BCKT%04d", n+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:368: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(gstr, "BCKD%04d", n+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:373: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(gstr, "BCKS%04d", n+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:377: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(gstr, "BKFS%04d", n+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:407: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 comment[88], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:447: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(gstr,"%04d-%02d-%02dT%02d:%02d:%02d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:480: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(gstr, "COMIN%-3d", d+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:485: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(gstr, "RESAMPT%1d", d+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:491: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(gstr, "CENTERT%1d", d+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/header.c:496: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(gstr, "PSCALET%1d", d+1); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/key.h:39: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 name[32]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/key.h:45: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 keylist[32][32]; /* List of keywords */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/main.c:76:3: [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(prefs.prefs_name, "default.swarp"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:82: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(prefs.sdate_start,"%04d-%02d-%02d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:84: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(prefs.stime_start,"%02d:%02d:%02d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:278: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(gstr, " Weight scale: %.7g", inwfield[k]->sigfac); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:305: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(infield[k]->sdate_end,"%04d-%02d-%02d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:307: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(infield[k]->stime_end,"%02d:%02d:%02d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:370: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(prefs.sdate_end,"%04d-%02d-%02d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:372: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(prefs.stime_end,"%02d:%02d:%02d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/makeit.c:460: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 error[MAXCHAR]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/preflist.h:152:1: [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 keylist[sizeof(key)/sizeof(pkeystruct)][32]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:93: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 *cp, str[MAXCHARL], *keyword, *value, **dp; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:97: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. static char value2[MAXCHARL],envname[MAXCHAR]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:102:17: [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 ((infile = fopen(filename,"r")) == NULL) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:231:21: [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. strcpy((char *)key[nkey].ptr, value); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:346:22: [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. free(((char **)key[nkey].ptr)[i]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:347: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. QMALLOC(((char **)key[nkey].ptr)[i], char, MAXCHAR); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:348: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. strcpy(((char **)key[nkey].ptr)[i], value); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:441: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 liststr[MAXCHAR], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:445: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). if (!(fp=fopen(listname,"r"))) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:543: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(gstr, "%d", (unsigned int)rlim.rlim_cur); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:619: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(prefs.inwfield_name[i], "INTERNAL"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:64: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 prefs_name[MAXCHAR]; /* prefs filename*/ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:65: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 *(infield_name[MAXINFIELD]);/* Filename(s) of input images */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:67: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 *(inwfield_name[MAXINFIELD]);/* Filename(s) of input weights */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:69: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 head_suffix[MAXCHAR]; /* Generic suffix for FITS headers */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:70: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 resamp_suffix[MAXCHAR]; /* Generic suffix for resampled FITS */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:71: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 weight_suffix[MAXCHAR]; /* Generic suffix for input weights */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:72: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 outfield_name[MAXCHAR]; /* Output image filename */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:73: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 outwfield_name[MAXCHAR];/* Output weight-map filename */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:96: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 gain_keyword[MAXCHAR]; /* FITS keyword for gain */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:99: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 sat_keyword[MAXCHAR]; /* FITS keyword for saturation */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:102: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 fscale_keyword[MAXCHAR];/* FITS keyword for flux scale */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:115: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 clip_logname[MAXCHAR]; /* filename for clipping log */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:118: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 projection_name[MAXCHAR];/* Projection WCS code */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:123: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 *(image_center[INTERP_MAXDIM]);/* Center coordinates */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:140: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 swapdir_name[MAXCHAR]; /* Name of virtual mem directory */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:142: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 resampdir_name[MAXCHAR];/* Name of resampling directory */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:151: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 *(copy_keywords[1024]); /* FITS keywords to be propagated */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:158: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 xml_name[MAXCHAR]; /* XML file name */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:159: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 xsl_name[MAXCHAR]; /* XSL file name (or URL) */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:160: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 sdate_start[12]; /* SWarp start date */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:161: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 stime_start[12]; /* SWarp start time */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:162: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 sdate_end[12]; /* SWarp end date */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.h:163: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 stime_end[12]; /* SWarp end time */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:85: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 padbuf[FBSIZE]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:124: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. static char filename[MAXCHAR],filename2[MAXCHAR], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/resample.c:142: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(pstr, "_v%d", infield->version); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/cel.c:287:1: [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 pcodes[27][4] = data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/cel.c:313: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. const char pcode[4]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/cel.c:570: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. const char pcode[4]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/cel.c:599: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. const char pcode[4]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/cel.h:71: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. extern char pcodes[27][4]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/poly.c:86: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 str[512]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/poly.c:94: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, "The dimensionality of the polynom (%d) exceeds the maximum\n" data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/poly.c:127: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(str, "The degree of the polynom (%d) exceeds the maximum\n" data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:464: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 requir[9]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:498: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. sprintf(wcs->pcode, "%.3s", &ctype[j][5]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:502: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(wcs->lngtyp, "RA"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:503: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(wcs->lattyp, "DEC"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:508: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(wcs->lngtyp, "RA"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:509: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(wcs->lattyp, "DEC"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:514: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(wcs->lngtyp, "%cLON", ctype[j][0]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:515: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(wcs->lattyp, "%cLAT", ctype[j][0]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:520: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(wcs->lngtyp, "%cLON", ctype[j][0]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:521: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(wcs->lattyp, "%cLAT", ctype[j][0]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:593:10: [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(wcs->pcode, "SIN"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:727:10: [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(wcs->pcode, "SIN"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.h:73: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 pcode[4]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.h:74: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 lngtyp[5], lattyp[5]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:164: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). else if (!(file = fopen(prefs.xml_name, "w"))) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:191: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 sysname[16], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:218: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(sysname, "xy"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:221: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(sysname, "galactic"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:224: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(sysname, "ecl_FK5"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:227: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(sysname, "supergalactic"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:232: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(sysname, "ICRS"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:258: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 sysname[16], data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:267: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(prefs.sdate_end,"%04d-%02d-%02d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:269: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(prefs.stime_end,"%02d:%02d:%02d", data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:487: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(sysname, "xy"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:490: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(sysname, "galactic"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:493: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(sysname, "ecl_FK5"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:496: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(sysname, "supergalactic"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:501: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(sysname, "ICRS"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.c:807: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). else if (!(file = fopen(filename, "w"))) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.h:52: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 ext_date[16],ext_time[16]; /* date and time */ data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/xml.h:54: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 ident[80]; /* identifiant */ data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_imglist-test.c:54:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_inputs-test.c:127:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_inputs-test.c:344:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_inputs-test.c:484:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_inputs-test.c:617:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_inputs-test.c:820:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_inputs-test.c:882:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_inputs-test.c:1141:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_inputs-test.c:1259:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_queue-test.c:54:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:109:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:147:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:241:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:280:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:323:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:398:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:611:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:850:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:995:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:1043:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:1095:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/tests/visir_utils-test.c:1142:11: [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). ? fopen("/dev/null", "a") : stdout; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_inputs.c:551: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(cpl_bivector_get_x_data(lintable), data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_inputs.c:554: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(cpl_bivector_get_y_data(lintable), data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_serialize.c:81: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(stream->pos, &v, sizeof(v)); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_serialize.c:91: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(stream->pos, s, n); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_serialize.c:110: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(s, stream->pos, n); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spc_optmod.h:80: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 contents[VISIR_SPC_OPTMOD_SIZEOF - sizeof(double)]; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spc_photom.c:484: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(cpl_vector_get_data(model_x), dd, nb_vals * sizeof(double)); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spc_photom.c:495: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(cpl_vector_get_data(model_y), dd, nb_vals * sizeof(double)); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spectro.c:250: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 ptmp[IRPLIB_FITS_STRLEN+1]; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spectro.c:1795: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(cpl_vector_get_data(self), data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:138:9: [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). f = fopen("/sys/devices/system/cpu/cpu0/" data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:141: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 buf[80]; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:166: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 tmpdir[strlen(tmpdir_) + 1]; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:173:18: [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). int fd = mkstemp(tmpdir); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:238: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). int fd = open(filename, O_RDONLY); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:264: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). int fd = open(filename, O_RDONLY); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:305: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[80]; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:306: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(buffer, "NAXIS%d", i + 1); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:722:20: [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(buf, "wt"); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:927: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 tmpdir[strlen(recipename) + 8]; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:990: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 tmpdir[strlen(recipename) + 8]; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:1771: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 line[1024]; data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c:1173:17: [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. cpl_boolean equal; data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c:1195: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. if (!equal) { data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c:1207: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. if (!equal) { data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c:1219: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. if (!equal) { data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c:1231: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. if (!equal) { data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c:1243: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. if (!equal) { data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c:1255: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. if (!equal) { data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c:1266: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. if (!equal) { data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c:1281: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. if (!equal) { data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_framelist.c:1286: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; data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:923: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). size_t n1 = strlen(va[i]); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:924: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). size_t n2 = strlen(vb[i]); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:1283: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). size_t keylen = strlen(keyword_table[mid].name); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:1302: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(record->name) != strlen(name)) { data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:1302: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). if (strlen(record->name) != strlen(name)) { data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:1306: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). const char *c = name + strlen(record->name); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:2621:55: [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). cpl_size extra_length = (extra != NULL ? (cpl_size) strlen(extra) : 0); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:2655: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). name_length = (cpl_size) strlen(name); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:2659:34: [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). fragment_length = (cpl_size) strlen(fragment); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:2673:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(writepos, fragment, bytesleft); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:2676:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(writepos, name, bytesleft); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:2683:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(writepos, join_fragment, bytesleft); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:2684: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). bytesleft -= (cpl_size) strlen(join_fragment); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:2685: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). writepos += (cpl_size) strlen(join_fragment); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:2686:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(writepos, extra, bytesleft); data/cpl-plugin-visir-4.3.10+dfsg/irplib/irplib_sdp_spectrum.c:2690:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(writepos, end_fragment, bytesleft); data/cpl-plugin-visir-4.3.10+dfsg/irplib/tests/irplib_utils-test.c:177:21: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. cpl_test_assert(sscanf(line, "%31s %16lf", &str[0], &val) != EOF); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_phot.c:649:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy(visir_img_phot_config.star_name, sval, fits_strlen); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_img_phot.c:653:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(visir_img_phot_config.filter, sval, fits_strlen); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_img_std_cat.c:301: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). "formatted: %s", (unsigned)strlen(line), nvals, njys+9, data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_std_cat.c:225:32: [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). ilen = fstop == NULL ? strlen(fstart) : (size_t) (fstop - fstart); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_txt2fits.c:157: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). baselen = dotpos == NULL ? strlen(basepos) : (size_t)(dotpos - basepos); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_txt2fits.c:159:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(extname, basepos, CX_MIN(FLEN_VALUE, baselen)); data/cpl-plugin-visir-4.3.10+dfsg/recipes/visir_util_spc_txt2fits.c:307:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(value, line+1, FLEN_VALUE); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/coadd.c:145: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). char compressedFilename[strlen(outfield->cat->filename) + 20]; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:103: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). pstr = field->hfilename+strlen(field->hfilename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:398: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). pstr = field->hfilename+strlen(field->hfilename); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:464:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ctype[n], infield[0]->wcs->ctype[axis[0+n]], 8); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:478:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ctype[lng], celsysname[n][0], 4); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:479:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ctype[lat], celsysname[n][1], 4); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:489:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wcs->cunit[lng], infield[0]->wcs->cunit[axis[0+lng]], 8); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:491:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wcs->cunit[lat], infield[0]->wcs->cunit[axis[0+lat]], 8); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:758:9: [1] (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 character. strcpy(wcs->ctype[lng], ""); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/field.c:759:9: [1] (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 character. strcpy(wcs->ctype[lat], ""); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsconv.c:96:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(line, lptr, 80); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:453:7: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(str, "("); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:461:7: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(str2, ")"); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:522:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(tab->headbuf, "SIMPLE = T " data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitshead.c:553:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(tab->headbuf, "XTENSION= 'IMAGE ' " data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:148: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). len = strlen(keyword); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:175:32: [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 (!strncmp(fitsbuf, str, strlen(str))) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:350:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str,fitsbuf+80*pos,80); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:373:18: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. case H_BOOL: sscanf(str+10, "%1s", s); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:529: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(str2)<=18) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:590:32: [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 (posoff==10 && i && (l=69-strlen(str))>0) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:592:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str2, cstr, i); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:594:5: [1] (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 character. strcat(str, " "); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fits/fitsutil.c:595:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, str2, l); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:133:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wcs->ctype[l], ctype[l], 8); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:135:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(wcs->ctype[l], "RA---AIT", 8); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:137:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(wcs->ctype[l], "DEC--AIT", 8); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:383:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wcs->ctype[l], str, 8); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:386:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wcs->cunit[l], str, 32); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:548:19: [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). pstr += strlen(pstr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/fitswcs.c:555:19: [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). pstr += strlen(pstr); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/main.c:85: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). if (strlen(argv[a])<4 || opt == '-') data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:177:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(envname, valuet, nc=strcspn(valuet,"}/:\"\'\\")); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:454: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). l = strlen(str)+1; data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:601:41: [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). pstr = prefs.inwfield_name[i]+strlen(prefs.inwfield_name[i]); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/prefs.c:757: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 ((j=strlen(pstr=prefs.copy_keywords[i]))!=8) data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:466:4: [1] (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 character. strcpy(wcs->pcode, ""); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:467:4: [1] (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 character. strcpy(requir, ""); data/cpl-plugin-visir-4.3.10+dfsg/swarp/src/wcs/wcs.c:535:10: [1] (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 character. strcpy(requir, ""); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_inputs.c:1914: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). } else if (strlen(sval) == 0) { data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_pfits.c:392:40: [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 (strncmp(spec[i], filt, strlen(spec[i]) - 5) == 0) { data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_pfits.c:714:19: [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 (sscale && strlen(sscale) > 0) data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_serialize.c:88: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). size_t n = strlen(s); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_spectro.c:340:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ptmp, pfits, IRPLIB_FITS_STRLEN); data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:166:17: [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 tmpdir[strlen(tmpdir_) + 1]; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:927:17: [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 tmpdir[strlen(recipename) + 8]; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.c:990:17: [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 tmpdir[strlen(recipename) + 8]; data/cpl-plugin-visir-4.3.10+dfsg/visir/visir_utils.h:171: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). return (str == NULL || strlen(str) == 0 || ANALYSIS SUMMARY: Hits = 686 Lines analyzed = 98754 in approximately 2.62 seconds (37684 lines/second) Physical Source Lines of Code (SLOC) = 62619 Hits@level = [0] 293 [1] 82 [2] 395 [3] 26 [4] 183 [5] 0 Hits@level+ = [0+] 979 [1+] 686 [2+] 604 [3+] 209 [4+] 183 [5+] 0 Hits/KSLOC@level+ = [0+] 15.6342 [1+] 10.9551 [2+] 9.64563 [3+] 3.33765 [4+] 2.92244 [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.