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/modem-manager-gui-0.0.20/src/modules/historyshm.h
Examining data/modem-manager-gui-0.0.20/src/modules/historyshm.c
Examining data/modem-manager-gui-0.0.20/src/modules/uuid.h
Examining data/modem-manager-gui-0.0.20/src/modules/uuid.c
Examining data/modem-manager-gui-0.0.20/src/modules/mm06.c
Examining data/modem-manager-gui-0.0.20/src/modules/nm09.c
Examining data/modem-manager-gui-0.0.20/src/modules/connman112.c
Examining data/modem-manager-gui-0.0.20/src/modules/pppd245.c
Examining data/modem-manager-gui-0.0.20/src/modules/mm07.c
Examining data/modem-manager-gui-0.0.20/src/modules/ofono109.c
Examining data/modem-manager-gui-0.0.20/src/contacts-page.c
Examining data/modem-manager-gui-0.0.20/src/vcard.c
Examining data/modem-manager-gui-0.0.20/src/scan-page.c
Examining data/modem-manager-gui-0.0.20/src/mmguicore.h
Examining data/modem-manager-gui-0.0.20/src/sms-page.h
Examining data/modem-manager-gui-0.0.20/src/svcmanager.h
Examining data/modem-manager-gui-0.0.20/src/mmguicore.c
Examining data/modem-manager-gui-0.0.20/src/connection-editor-window.h
Examining data/modem-manager-gui-0.0.20/src/preferences-window.h
Examining data/modem-manager-gui-0.0.20/src/sms-page.c
Examining data/modem-manager-gui-0.0.20/src/svcmanager.c
Examining data/modem-manager-gui-0.0.20/src/connection-editor-window.c
Examining data/modem-manager-gui-0.0.20/src/strformat.h
Examining data/modem-manager-gui-0.0.20/src/preferences-window.c
Examining data/modem-manager-gui-0.0.20/src/netlink.h
Examining data/modem-manager-gui-0.0.20/src/modem-settings.h
Examining data/modem-manager-gui-0.0.20/src/dbus-utils.h
Examining data/modem-manager-gui-0.0.20/src/trafficdb.h
Examining data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c
Examining data/modem-manager-gui-0.0.20/src/devices-page.h
Examining data/modem-manager-gui-0.0.20/src/strformat.c
Examining data/modem-manager-gui-0.0.20/src/addressbooks.h
Examining data/modem-manager-gui-0.0.20/src/netlink.c
Examining data/modem-manager-gui-0.0.20/src/modem-settings.c
Examining data/modem-manager-gui-0.0.20/src/dbus-utils.c
Examining data/modem-manager-gui-0.0.20/src/trafficdb.c
Examining data/modem-manager-gui-0.0.20/src/devices-page.c
Examining data/modem-manager-gui-0.0.20/src/addressbooks.c
Examining data/modem-manager-gui-0.0.20/src/main.h
Examining data/modem-manager-gui-0.0.20/src/libpaths.h
Examining data/modem-manager-gui-0.0.20/src/smsdb.h
Examining data/modem-manager-gui-0.0.20/src/ayatana.h
Examining data/modem-manager-gui-0.0.20/src/smsdb.c
Examining data/modem-manager-gui-0.0.20/src/libpaths.c
Examining data/modem-manager-gui-0.0.20/src/providersdb.h
Examining data/modem-manager-gui-0.0.20/src/settings.h
Examining data/modem-manager-gui-0.0.20/src/ussdlist.h
Examining data/modem-manager-gui-0.0.20/src/ayatana.c
Examining data/modem-manager-gui-0.0.20/src/polkit.h
Examining data/modem-manager-gui-0.0.20/src/ussd-page.h
Examining data/modem-manager-gui-0.0.20/src/providersdb.c
Examining data/modem-manager-gui-0.0.20/src/traffic-page.h
Examining data/modem-manager-gui-0.0.20/src/settings.c
Examining data/modem-manager-gui-0.0.20/src/welcome-window.h
Examining data/modem-manager-gui-0.0.20/src/notifications.h
Examining data/modem-manager-gui-0.0.20/src/ussdlist.c
Examining data/modem-manager-gui-0.0.20/src/info-page.h
Examining data/modem-manager-gui-0.0.20/src/polkit.c
Examining data/modem-manager-gui-0.0.20/src/ussd-page.c
Examining data/modem-manager-gui-0.0.20/src/encoding.h
Examining data/modem-manager-gui-0.0.20/src/traffic-page.c
Examining data/modem-manager-gui-0.0.20/src/contacts-page.h
Examining data/modem-manager-gui-0.0.20/src/welcome-window.c
Examining data/modem-manager-gui-0.0.20/src/vcard.h
Examining data/modem-manager-gui-0.0.20/src/scan-page.h
Examining data/modem-manager-gui-0.0.20/src/notifications.c
Examining data/modem-manager-gui-0.0.20/src/info-page.c
Examining data/modem-manager-gui-0.0.20/src/encoding.c
Examining data/modem-manager-gui-0.0.20/src/main.c

FINAL RESULTS:

data/modem-manager-gui-0.0.20/src/modules/pppd245.c:507:11:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	status = readlink((const char *)sysfspath, sysfslink, sizeof(sysfslink));
data/modem-manager-gui-0.0.20/src/netlink.c:129:14:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	linkchars = readlink(fpath, appname, appsize-1);
data/modem-manager-gui-0.0.20/src/preferences-window.c:559:10:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
			len = readlink(linkfile, desktopfile, statbuf.st_size + 1);
data/modem-manager-gui-0.0.20/src/preferences-window.c:611:10:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
			len = readlink(linkfile, desktopfile, statbuf.st_size + 1);
data/modem-manager-gui-0.0.20/src/addressbooks.c:210:13:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			reqlen = vsnprintf(reqsegm + command->requestprefixlen, reqsegmsize, format, args);
data/modem-manager-gui-0.0.20/src/modules/connman112.c:144:3:  [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.
		sscanf(uuid, MODULE_INT_CONNMAN_UUID_GENERATION_TEMPLATE, &id);
data/modem-manager-gui-0.0.20/src/modules/historyshm.c:94:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(shmname, sizeof(shmname), MMGUI_HISTORY_SHM_SEGMENT_NAME, drivername);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:221:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(pidfilepath, sizeof(pidfilepath), MODULE_INT_PPPD_LOCK_FILE_PATH, moduledata->connifname);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:505:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(sysfspath, sizeof(sysfspath), MODULE_INT_PPPD_SYSFS_DEVICE_PATH, devmajor, devminor);
data/modem-manager-gui-0.0.20/src/netlink.c:82:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fullpath, "/proc/%s", dirname);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:191:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(shmname, sizeof(shmname), MMGUI_HISTORY_SHM_SEGMENT_NAME, driver->name);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:253:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(shmname, sizeof(shmname), MMGUI_HISTORY_SHM_SEGMENT_NAME, driver->name);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:412:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		msgidlen = snprintf(msgid, sizeof(msgid), "%s@%s@%" G_GUINT64_FORMAT, uuidstr, modem->driver->name, localts);
data/modem-manager-gui-0.0.20/src/addressbooks.c:119:12:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
	homedir = g_get_home_dir();
data/modem-manager-gui-0.0.20/src/addressbooks.c:974: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.
	desktop = getenv("XDG_CURRENT_DESKTOP");
data/modem-manager-gui-0.0.20/src/addressbooks.c:1087:13:  [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.
		version = getenv("KDE_SESSION_VERSION");
data/modem-manager-gui-0.0.20/src/connection-editor-window.c:1124: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.
			langenv = getenv("LANG");
data/modem-manager-gui-0.0.20/src/libpaths.c:76:13:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
	homepath = g_get_home_dir();
data/modem-manager-gui-0.0.20/src/main.c:2035: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.
	desktop = getenv("XDG_CURRENT_DESKTOP");
data/modem-manager-gui-0.0.20/src/modules/uuid.c:40:12:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		symval = g_rand_int_range(rng, 0, 32767) % 16;
data/modem-manager-gui-0.0.20/src/polkit.c:171:11:  [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.
	locale = getenv("LANG");
data/modem-manager-gui-0.0.20/src/sms-page.c:1844: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.
		locale = getenv("LANG");
data/modem-manager-gui-0.0.20/src/smsdb.c:96:34:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
		oldfilename = g_build_filename(g_get_home_dir(), ".config", "modem-manager-gui", filename, NULL);	
data/modem-manager-gui-0.0.20/src/smsdb.c:466:21:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		idvalue = (gulong)random();
data/modem-manager-gui-0.0.20/src/trafficdb.c:298:34:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
		oldfilename = g_build_filename(g_get_home_dir(), ".config", "modem-manager-gui", filename, NULL);	
data/modem-manager-gui-0.0.20/src/ussdlist.c:85:33:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
	oldfilename = g_build_filename(g_get_home_dir(), ".config", "modem-manager-gui", filename, NULL);	
data/modem-manager-gui-0.0.20/src/addressbooks.c:221: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(reqsegm, command->requestprefix, command->requestprefixlen);
data/modem-manager-gui-0.0.20/src/connection-editor-window.c:514:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				value = (guint)atoi(gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->connnetidspinbutton)));
data/modem-manager-gui-0.0.20/src/encoding.c:718: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).
				value = (guchar)atoi((const char *)buf);
data/modem-manager-gui-0.0.20/src/encoding.c:726: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).
				value = (guchar)atoi((const char *)buf);
data/modem-manager-gui-0.0.20/src/libpaths.c:386: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).
			*(verarray[i]) = atoi(token);
data/modem-manager-gui-0.0.20/src/libpaths.c:483:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		libcache->fd = open(MMGUI_LIBPATHS_CACHE_FILE, O_RDONLY);
data/modem-manager-gui-0.0.20/src/modules/connman112.c:123:82:  [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).
			resuuid = g_strdup_printf(MODULE_INT_CONNMAN_UUID_GENERATION_TEMPLATE, (guint)atoi(constr + 8));
data/modem-manager-gui-0.0.20/src/modules/connman112.c:171:94:  [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).
				respath = g_strdup_printf(MODULE_INT_CONNMAN_SERVICE_PATH_TEMPLATE_GSM, deviceid, (guint)atoi(constr + 8));
data/modem-manager-gui-0.0.20/src/modules/historyshm.c:252:24:  [2] (integer) atol:
  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).
			timestamp = (time_t)atol(text);
data/modem-manager-gui-0.0.20/src/modules/historyshm.c:312:12:  [2] (integer) atol:
  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).
	localts = atol(timestr+1);
data/modem-manager-gui-0.0.20/src/modules/historyshm.c:346:4:  [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(drivername, path+1, driverlen);
data/modem-manager-gui-0.0.20/src/modules/historyshm.c:349:19:  [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).
				*identifier = atoi(path+idpos+1);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:191:8:  [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).
		id = atoi(devidstr);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:236:2:  [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(codepartbuf, decopcodestr, 3);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:237:19:  [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).
	operatorcode |= (atoi(codepartbuf) & 0x0000ffff) << 16;
data/modem-manager-gui-0.0.20/src/modules/mm06.c:241:2:  [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(codepartbuf, decopcodestr + 3, decopcodelen - 3);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:242:18:  [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).
	operatorcode |= atoi(codepartbuf) & 0x0000ffff;
data/modem-manager-gui-0.0.20/src/modules/mm06.c:2458:18:  [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).
				*fields[i] = atoi(strbuf);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:2465:18:  [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).
				*fields[i] = atoi(strbuf);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:3064:27:  [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).
		network->operator_num = atoi(valuestr);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:3074:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		network->access_tech = atoi(valuestr);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:3104: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).
		network->status = atoi(valuestr);
data/modem-manager-gui-0.0.20/src/modules/mm07.c:304:8:  [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).
		id = atoi(objectpathid);
data/modem-manager-gui-0.0.20/src/modules/mm07.c:349:2:  [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(codepartbuf, decopcodestr, 3);
data/modem-manager-gui-0.0.20/src/modules/mm07.c:350:19:  [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).
	operatorcode |= (atoi(codepartbuf) & 0x0000ffff) << 16;
data/modem-manager-gui-0.0.20/src/modules/mm07.c:354:2:  [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(codepartbuf, decopcodestr + 3, decopcodelen - 3);
data/modem-manager-gui-0.0.20/src/modules/mm07.c:355:18:  [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).
	operatorcode |= atoi(codepartbuf) & 0x0000ffff;
data/modem-manager-gui-0.0.20/src/modules/mm07.c:2580:18:  [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).
				*fields[i] = atoi(strbuf);
data/modem-manager-gui-0.0.20/src/modules/mm07.c:2587:18:  [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).
				*fields[i] = atoi(strbuf);
data/modem-manager-gui-0.0.20/src/modules/mm07.c:3312:27:  [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).
		network->operator_num = atoi(valuestr);
data/modem-manager-gui-0.0.20/src/modules/nm09.c:437: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).
							(*moduledata)->vermajor = atoi(verstrarr[i]);
data/modem-manager-gui-0.0.20/src/modules/nm09.c:440: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).
							(*moduledata)->verminor = atoi(verstrarr[i]);
data/modem-manager-gui-0.0.20/src/modules/nm09.c:443:37:  [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).
							(*moduledata)->verrevision = atoi(verstrarr[i]);
data/modem-manager-gui-0.0.20/src/modules/nm09.c:603:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
								connection->networkid = (guint)atoi(connparamstr);
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:280:44:  [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).
							mmguicore->device->operatorcode |= (atoi(parameter) & 0x0000ffff) << 16;
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:282:44:  [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).
							mmguicore->device->loc3gppdata[0] = atoi(parameter);
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:312:43:  [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).
							mmguicore->device->operatorcode |= atoi(parameter) & 0x0000ffff;
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:314:44:  [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).
							mmguicore->device->loc3gppdata[1] = atoi(parameter);
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:1898:30:  [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).
				device->loc3gppdata[0] = atoi(parameter);
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:1912:30:  [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).
				device->loc3gppdata[1] = atoi(parameter);
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:2702:22:  [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).
				*fields[field] = atoi(strbuf);
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:3289:12:  [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).
					mcc = atoi(parameter);
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:3300:12:  [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).
					mnc = atoi(parameter);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:146:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buffer, segstart+paramlen, datalen);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:172:2:  [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(result, segstart, segend-segstart);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:202:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buffer, segstart + 1, datalen);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:223: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).
	pidfilefd = open(pidfilepath, O_RDONLY);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:231:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	if ((status != -1) && ((pid_t)atoi(pidfiledata) == moduledata->pid)) {
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:413:9:  [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).
	dbfd = open(MODULE_INT_PPPD_DB_FILE_PATH_1, O_RDONLY);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:417:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		dbfd = open(MODULE_INT_PPPD_DB_FILE_PATH_2, O_RDONLY);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:480: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).
		moduledata->pid = (pid_t)atoi(parameter);
data/modem-manager-gui-0.0.20/src/netlink.c:135:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(fpath, O_RDONLY);
data/modem-manager-gui-0.0.20/src/netlink.c:179:18:  [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).
							*apppid = atoi(procde->d_name);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:109:12:  [2] (integer) atol:
  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).
	localts = atol(timestr+1);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:143:4:  [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(drivername, path+1, driverlen);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:146:19:  [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).
				*identifier = atoi(path+idpos+1);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:267:8:  [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(rmkeystr, key.dptr, key.dsize);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:445: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 buf[128];
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:459: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 buf[128];
data/modem-manager-gui-0.0.20/src/providersdb.c:468: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(db->curcountry, attr_values[0], 2);
data/modem-manager-gui-0.0.20/src/providersdb.c:507:15:  [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).
				netid |= (atoi(attr_values[0]) << 16) & 0xffff0000;
data/modem-manager-gui-0.0.20/src/providersdb.c:512:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				netid |= atoi(attr_values[1]) & 0x0000ffff;
data/modem-manager-gui-0.0.20/src/providersdb.c:533:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				netid = (atoi(attr_values[0]) & 0xffffffff);
data/modem-manager-gui-0.0.20/src/smsdb.c:766:6:  [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(newmsg, data.dptr, data.dsize-9);
data/modem-manager-gui-0.0.20/src/smsdb.c:767:6:  [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(newmsg+data.dsize-9, newtrailer, newtrailerlen);
data/modem-manager-gui-0.0.20/src/smsdb.c:873:33:  [2] (integer) atol:
  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).
			message->timestamp = (time_t)atol(text);
data/modem-manager-gui-0.0.20/src/smsdb.c:876:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			if (atoi(text)) {
data/modem-manager-gui-0.0.20/src/smsdb.c:895:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			if (atoi(text)) {
data/modem-manager-gui-0.0.20/src/smsdb.c:902:22:  [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).
			message->folder = atoi(text);
data/modem-manager-gui-0.0.20/src/ussdlist.c:160:25:  [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).
			reencode = (gboolean)atoi(attr_values[0]);
data/modem-manager-gui-0.0.20/src/vcard.c:141:2:  [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(unescapedstr, strstart, startlength);
data/modem-manager-gui-0.0.20/src/addressbooks.c:167:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(address.sun_path, socketpath, sizeof(address.sun_path)-1);
data/modem-manager-gui-0.0.20/src/addressbooks.c:394:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			start += strlen(prefix);
data/modem-manager-gui-0.0.20/src/addressbooks.c:443:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			start += strlen(prefix);
data/modem-manager-gui-0.0.20/src/addressbooks.c:454:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(res, start, fragmentlen);
data/modem-manager-gui-0.0.20/src/addressbooks.c:476:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			start += strlen(prefix);
data/modem-manager-gui-0.0.20/src/ayatana.c:89: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).
	pathlen = strlen(filepath);
data/modem-manager-gui-0.0.20/src/dbus-utils.c:173:48:  [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 (!g_markup_parse_context_parse(mpc, xml, strlen(xml), &error)) {
data/modem-manager-gui-0.0.20/src/devices-page.c:400:83:  [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).
	devmanufacturer = encoding_clear_special_symbols(g_strdup(device->manufacturer), strlen(device->manufacturer));
data/modem-manager-gui-0.0.20/src/devices-page.c:401:69:  [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).
	devmodel = encoding_clear_special_symbols(g_strdup(device->model), strlen(device->model));
data/modem-manager-gui-0.0.20/src/devices-page.c:402:73:  [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).
	devversion = encoding_clear_special_symbols(g_strdup(device->version), strlen(device->version));
data/modem-manager-gui-0.0.20/src/encoding.c:619: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).
	strsize = strlen(srcstr);
data/modem-manager-gui-0.0.20/src/encoding.c:717:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy((char *)buf, (const char *)input+iptr, 3);
data/modem-manager-gui-0.0.20/src/encoding.c:725:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy((char *)buf, (const char *)input+iptr, 2);
data/modem-manager-gui-0.0.20/src/libpaths.c:321:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(path, libpath, pathendptr - libpath);
data/modem-manager-gui-0.0.20/src/libpaths.c:345:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(name, linktarget, soextptr - linktarget);
data/modem-manager-gui-0.0.20/src/libpaths.c:348:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(name, pathendptr + 1, soextptr - pathendptr - 1);
data/modem-manager-gui-0.0.20/src/mmguicore.c:407:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(buffer, segstart + 1, namelen);
data/modem-manager-gui-0.0.20/src/mmguicore.c:594: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).
	if ((!mmguicore->updatecache) || (strlen(module->filename) == 0)) return FALSE;
data/modem-manager-gui-0.0.20/src/mmguicore.c:666:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		res = strncpy(target, cachedvalue, size);
data/modem-manager-gui-0.0.20/src/mmguicore.c:704: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).
		length = strlen(groups[i]);
data/modem-manager-gui-0.0.20/src/mmguicore.c:758:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(modparams->filename, groups[i], sizeof(modparams->filename)-1);
data/modem-manager-gui-0.0.20/src/mmguicore.c:797: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).
		length = strlen(modname);
data/modem-manager-gui-0.0.20/src/mmguicore.c:811:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
							strncpy(modparams->filename, modname, sizeof(modparams->filename)-1);
data/modem-manager-gui-0.0.20/src/mmguicore.c:2360: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).
		length = strlen(number);
data/modem-manager-gui-0.0.20/src/mmguicore.c:2412: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).
	length = strlen(request);
data/modem-manager-gui-0.0.20/src/mmguicore.c:3087:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				recvbytes = read(ctlfd, &workthreadcmd, sizeof(workthreadcmd));
data/modem-manager-gui-0.0.20/src/mmguicore.c:3117:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(oldinterface, mmguicore->device->interface, sizeof(oldinterface));
data/modem-manager-gui-0.0.20/src/modules/connman112.c:1222:18:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
																	strncpy(mmguicore->device->interface, interface, IFNAMSIZ-1);
data/modem-manager-gui-0.0.20/src/modules/connman112.c:1285:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
									strncpy(mmguicore->device->interface, interface, IFNAMSIZ-1);
data/modem-manager-gui-0.0.20/src/modules/connman112.c:1450:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
											strncpy(mmguicore->device->interface, interface, IFNAMSIZ-1);
data/modem-manager-gui-0.0.20/src/modules/connman112.c:1564:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
											strncpy(mmguicore->device->interface, interface, IFNAMSIZ-1);
data/modem-manager-gui-0.0.20/src/modules/historyshm.c:316:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	if (strncpy(buf, drvstr+1, drvlen) != NULL) {
data/modem-manager-gui-0.0.20/src/modules/historyshm.c:332: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).
	pathlen = strlen(path);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:209: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).
	length = strlen(opcodestr);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:2450:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(str);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:2456:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(strbuf, str+(i*2), 2);
data/modem-manager-gui-0.0.20/src/modules/mm06.c:2463:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(strbuf, str+(i*3), 2);
data/modem-manager-gui-0.0.20/src/modules/mm07.c:322: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).
	length = strlen(opcodestr);
data/modem-manager-gui-0.0.20/src/modules/mm07.c:2572:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(str);
data/modem-manager-gui-0.0.20/src/modules/mm07.c:2578:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(strbuf, str+(i*2), 2);
data/modem-manager-gui-0.0.20/src/modules/mm07.c:2585:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(strbuf, str+(i*3), 2);
data/modem-manager-gui-0.0.20/src/modules/nm09.c:180:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(mmguicore->device->interface, devinterface, IFNAMSIZ-1);
data/modem-manager-gui-0.0.20/src/modules/nm09.c:775: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).
	if ((number != NULL) && (strlen(number) > 0)) {
data/modem-manager-gui-0.0.20/src/modules/nm09.c:778:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((username != NULL) && (strlen(username) > 0)) {
data/modem-manager-gui-0.0.20/src/modules/nm09.c:781:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((password != NULL) && (strlen(password) > 0)) {
data/modem-manager-gui-0.0.20/src/modules/nm09.c:785:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if ((apn != NULL) && (strlen(apn) > 0)) {
data/modem-manager-gui-0.0.20/src/modules/nm09.c:799:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (((dns1 != NULL) && (strlen(dns1) > 0)) || ((dns2 != NULL) && (strlen(dns2) > 0))) {
data/modem-manager-gui-0.0.20/src/modules/nm09.c:799:68:  [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 (((dns1 != NULL) && (strlen(dns1) > 0)) || ((dns2 != NULL) && (strlen(dns2) > 0))) {
data/modem-manager-gui-0.0.20/src/modules/nm09.c:801:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if ((dns1 != NULL) && (strlen(dns1) > 0)) {
data/modem-manager-gui-0.0.20/src/modules/nm09.c:809: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).
 		if ((dns2 != NULL) && (strlen(dns2) > 0)) {
data/modem-manager-gui-0.0.20/src/modules/nm09.c:1186:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
												strncpy(mmguicorelc->device->interface, nmdevinterface, IFNAMSIZ-1);
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:149: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).
	pathlen = strlen(devpath);
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:2685:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(str);
data/modem-manager-gui-0.0.20/src/modules/ofono109.c:2700:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(strbuf, str+prevptr, fieldlen);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:140:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	paramlen = strlen(parameter);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:160:95:  [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).
	segend = mmgui_module_pppd_strrstr(dbmapping, dbsize, MODULE_INT_PPPD_DB_FILE_END_PARAMETER, strlen(MODULE_INT_PPPD_DB_FILE_END_PARAMETER));
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:164:109:  [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).
	segstart = mmgui_module_pppd_strrstr(dbmapping, dbsize-(*segend), MODULE_INT_PPPD_DB_FILE_START_PARAMETER, strlen(MODULE_INT_PPPD_DB_FILE_START_PARAMETER));
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:184:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	paramlen = strlen(MODULE_INT_PPPD_SYSFS_START_PARAMETER);
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:227:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	status = read(pidfilefd, pidfiledata, sizeof(pidfiledata));
data/modem-manager-gui-0.0.20/src/modules/pppd245.c:253:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(mmguicorelc->device->interface, moduledata->connifname, IFNAMSIZ);
data/modem-manager-gui-0.0.20/src/netlink.c:137:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			linkchars = read(fd, appname, appsize-1);
data/modem-manager-gui-0.0.20/src/netlink.c:464:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(event->ifname, ifname, sizeof(event->ifname));
data/modem-manager-gui-0.0.20/src/netlink.c:487:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(event->ifname, (char *)RTA_DATA(rta), sizeof(event->ifname)-1);
data/modem-manager-gui-0.0.20/src/netlink.c:580:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(change->data.connection->srcaddr, connection->srcaddr, sizeof(change->data.connection->srcaddr));
data/modem-manager-gui-0.0.20/src/netlink.c:581:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(change->data.connection->dstaddr, connection->dstaddr, sizeof(change->data.connection->dstaddr));
data/modem-manager-gui-0.0.20/src/netlink.c:677:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(dstconn->srcaddr, srcconn->srcaddr, sizeof(dstconn->srcaddr));
data/modem-manager-gui-0.0.20/src/netlink.c:678:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(dstconn->dstaddr, srcconn->dstaddr, sizeof(dstconn->dstaddr));
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:113:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	if (strncpy(buf, drvstr+1, drvlen) != NULL) {
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:129: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).
	pathlen = strlen(path);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:193:14:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	old_umask = umask(0);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:195:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(old_umask);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:231:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	key.dsize = strlen(rmkeystr);
data/modem-manager-gui-0.0.20/src/plugins/ofonohistory.c:426: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).
		data.dsize = strlen(messagexml);
data/modem-manager-gui-0.0.20/src/smsdb.c:179: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).
	srclen = strlen(number);
data/modem-manager-gui-0.0.20/src/smsdb.c:210: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).
	srclen = strlen(number);
data/modem-manager-gui-0.0.20/src/smsdb.c:371:77:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
gboolean mmgui_smsdb_message_set_read(mmgui_sms_message_t message, gboolean read)
data/modem-manager-gui-0.0.20/src/smsdb.c:375:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	message->read = read;
data/modem-manager-gui-0.0.20/src/smsdb.c:384:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return message->read;
data/modem-manager-gui-0.0.20/src/smsdb.c:498:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
								message->read,
data/modem-manager-gui-0.0.20/src/smsdb.c:502:15:  [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).
	data.dsize = strlen(smsxml);
data/modem-manager-gui-0.0.20/src/smsdb.c:514:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (!message->read) {
data/modem-manager-gui-0.0.20/src/smsdb.c:568:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					if (!message->read) {
data/modem-manager-gui-0.0.20/src/smsdb.c:572:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(smsid, key.dptr, key.dsize);
data/modem-manager-gui-0.0.20/src/smsdb.c:867:74:  [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).
				message->number = encoding_clear_special_symbols((gchar *)numescstr, strlen(numescstr));
data/modem-manager-gui-0.0.20/src/smsdb.h:42:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	gboolean read;
data/modem-manager-gui-0.0.20/src/smsdb.h:66:77:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
gboolean mmgui_smsdb_message_set_read(mmgui_sms_message_t message, gboolean read);
data/modem-manager-gui-0.0.20/src/trafficdb.c:568:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(dayid, key.dptr, key.dsize);
data/modem-manager-gui-0.0.20/src/trafficdb.c:704:15:  [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).
	data.dsize = strlen(daytrafficxml);
data/modem-manager-gui-0.0.20/src/trafficdb.c:768:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(dayid, key.dptr, key.dsize);
data/modem-manager-gui-0.0.20/src/ussdlist.c:169:75:  [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).
				command = encoding_unescape_xml_markup((const gchar *)attr_values[i], strlen(attr_values[i]));
data/modem-manager-gui-0.0.20/src/ussdlist.c:171:79:  [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).
				description = encoding_unescape_xml_markup((const gchar *)attr_values[i], strlen(attr_values[i]));
data/modem-manager-gui-0.0.20/src/vcard.c:50: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).
	length = strlen(valuestr);
data/modem-manager-gui-0.0.20/src/vcard.c:59: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).
		startlength = strlen(strstart);

ANALYSIS SUMMARY:

Hits = 190
Lines analyzed = 43654 in approximately 1.02 seconds (42865 lines/second)
Physical Source Lines of Code (SLOC) = 33565
Hits@level = [0]  23 [1]  93 [2]  71 [3]  13 [4]   9 [5]   4
Hits@level+ = [0+] 213 [1+] 190 [2+]  97 [3+]  26 [4+]  13 [5+]   4
Hits/KSLOC@level+ = [0+] 6.3459 [1+] 5.66066 [2+] 2.88992 [3+] 0.774616 [4+] 0.387308 [5+] 0.119172
Dot directories skipped = 2 (--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.