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/almanah-0.12.2/src/application.c
Examining data/almanah-0.12.2/src/application.h
Examining data/almanah-0.12.2/src/date-entry-dialog.c
Examining data/almanah-0.12.2/src/date-entry-dialog.h
Examining data/almanah-0.12.2/src/entry.c
Examining data/almanah-0.12.2/src/entry.h
Examining data/almanah-0.12.2/src/event-factories/calendar-client.c
Examining data/almanah-0.12.2/src/event-factories/calendar-client.h
Examining data/almanah-0.12.2/src/event-factories/calendar-debug.h
Examining data/almanah-0.12.2/src/event-factories/calendar-sources.c
Examining data/almanah-0.12.2/src/event-factories/calendar-sources.h
Examining data/almanah-0.12.2/src/event-factories/calendar.c
Examining data/almanah-0.12.2/src/event-factories/calendar.h
Examining data/almanah-0.12.2/src/event-factories/e-cell-renderer-color.c
Examining data/almanah-0.12.2/src/event-factories/e-cell-renderer-color.h
Examining data/almanah-0.12.2/src/event-factories/e-source-selector.c
Examining data/almanah-0.12.2/src/event-factories/e-source-selector.h
Examining data/almanah-0.12.2/src/event-factory.c
Examining data/almanah-0.12.2/src/event-factory.h
Examining data/almanah-0.12.2/src/event-manager.c
Examining data/almanah-0.12.2/src/event-manager.h
Examining data/almanah-0.12.2/src/event.c
Examining data/almanah-0.12.2/src/event.h
Examining data/almanah-0.12.2/src/events/calendar-appointment.c
Examining data/almanah-0.12.2/src/events/calendar-appointment.h
Examining data/almanah-0.12.2/src/events/calendar-task.c
Examining data/almanah-0.12.2/src/events/calendar-task.h
Examining data/almanah-0.12.2/src/export-operation.c
Examining data/almanah-0.12.2/src/export-operation.h
Examining data/almanah-0.12.2/src/import-export-dialog.c
Examining data/almanah-0.12.2/src/import-export-dialog.h
Examining data/almanah-0.12.2/src/import-operation.c
Examining data/almanah-0.12.2/src/import-operation.h
Examining data/almanah-0.12.2/src/interface.c
Examining data/almanah-0.12.2/src/interface.h
Examining data/almanah-0.12.2/src/main-window.c
Examining data/almanah-0.12.2/src/main-window.h
Examining data/almanah-0.12.2/src/main.c
Examining data/almanah-0.12.2/src/preferences-dialog.c
Examining data/almanah-0.12.2/src/preferences-dialog.h
Examining data/almanah-0.12.2/src/printing.c
Examining data/almanah-0.12.2/src/printing.h
Examining data/almanah-0.12.2/src/search-dialog.c
Examining data/almanah-0.12.2/src/search-dialog.h
Examining data/almanah-0.12.2/src/storage-manager.c
Examining data/almanah-0.12.2/src/storage-manager.h
Examining data/almanah-0.12.2/src/uri-entry-dialog.c
Examining data/almanah-0.12.2/src/uri-entry-dialog.h
Examining data/almanah-0.12.2/src/vfs.c
Examining data/almanah-0.12.2/src/vfs.h
Examining data/almanah-0.12.2/src/widgets/calendar-button.c
Examining data/almanah-0.12.2/src/widgets/calendar-button.h
Examining data/almanah-0.12.2/src/widgets/calendar.c
Examining data/almanah-0.12.2/src/widgets/calendar.h
Examining data/almanah-0.12.2/src/widgets/eggwrapbox-enums.c
Examining data/almanah-0.12.2/src/widgets/eggwrapbox-enums.h
Examining data/almanah-0.12.2/src/widgets/eggwrapbox.c
Examining data/almanah-0.12.2/src/widgets/eggwrapbox.h
Examining data/almanah-0.12.2/src/widgets/entry-tags-area.c
Examining data/almanah-0.12.2/src/widgets/entry-tags-area.h
Examining data/almanah-0.12.2/src/widgets/hyperlink-tag.c
Examining data/almanah-0.12.2/src/widgets/hyperlink-tag.h
Examining data/almanah-0.12.2/src/widgets/tag-accessible.c
Examining data/almanah-0.12.2/src/widgets/tag-accessible.h
Examining data/almanah-0.12.2/src/widgets/tag-entry.c
Examining data/almanah-0.12.2/src/widgets/tag-entry.h
Examining data/almanah-0.12.2/src/widgets/tag.c
Examining data/almanah-0.12.2/src/widgets/tag.h
Examining data/almanah-0.12.2/tests/vfs.c

FINAL RESULTS:

data/almanah-0.12.2/src/event-factories/calendar-debug.h:33:24:  [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 dprintf(...) fprintf (stderr, __VA_ARGS__);
data/almanah-0.12.2/src/event-factories/calendar-debug.h:35:28:  [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 dprintf(args...) fprintf (stderr, args);
data/almanah-0.12.2/src/vfs.c:1186:7:  [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.
	rc = access (zPath, eAccess);
data/almanah-0.12.2/src/vfs.c:203: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, npm_closure->buffer + npm_closure->offset, read_size);
data/almanah-0.12.2/src/vfs.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 (npm_closure->buffer + npm_closure->offset, buffer, size);
data/almanah-0.12.2/src/vfs.c:596: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 (self->plain_buffer + offset, buffer, len);
data/almanah-0.12.2/src/vfs.c:779:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy (buffer, self->plain_buffer + offset, len);
data/almanah-0.12.2/src/vfs.c:847: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 (&self->aBuffer[self->nBuffer], z, nCopy);
data/almanah-0.12.2/src/vfs.c:1138: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 zDir[MAXPATHNAME + 1];
data/almanah-0.12.2/src/vfs.c:1206: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 zDir[MAXPATHNAME+1];
data/almanah-0.12.2/src/event-factories/calendar-client.c:1373: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 (uid);
data/almanah-0.12.2/src/event-factories/calendar-client.c:1375: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).
  if (len <= strlen (key) && strncmp (uid, key, len) == 0)
data/almanah-0.12.2/src/export-operation.c:242:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (g_file_replace_contents (file, content, strlen (content), NULL, FALSE,
data/almanah-0.12.2/src/import-operation.c:363:66:  [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_file_info_get_is_hidden (file_info) == TRUE || file_name[strlen (file_name) - 1] == '~') {
data/almanah-0.12.2/src/main-window.c:1433:71:  [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).
	gtk_css_provider_load_from_data (self->priv->css_provider, css_font, strlen(css_font), NULL);
data/almanah-0.12.2/src/vfs.c:799:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	nRead = read (self->fd, buffer, len);
data/almanah-0.12.2/src/vfs.c:1143: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).
		for (i = strlen(zDir); i > 1 && zDir[i] != '/'; i++);
data/almanah-0.12.2/src/vfs.c:1276:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep (nMicro % 1000000);

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 21828 in approximately 0.54 seconds (40738 lines/second)
Physical Source Lines of Code (SLOC) = 14959
Hits@level = [0]   0 [1]   8 [2]   7 [3]   0 [4]   3 [5]   0
Hits@level+ = [0+]  18 [1+]  18 [2+]  10 [3+]   3 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 1.20329 [1+] 1.20329 [2+] 0.668494 [3+] 0.200548 [4+] 0.200548 [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.