Arne Welzel
0f1c1cb754
clang-format: Sort doctest header at the bottom
2024-11-15 17:00:00 +01:00
Arne Welzel
0ecbd4435e
ZeekString: Implement move constructor
2024-11-04 16:17:47 +01:00
Dominik Charousset
cebb85b1e8
Fix unsafe and inefficient uses of copy_string
...
Add a new overload to `copy_string` that takes the input characters plus
size. The new overload avoids inefficient scanning of the input for the
null terminator in cases where we know the size beforehand. Furthermore,
this overload *must* be used when dealing with input character sequences
that may have no null terminator, e.g., when the input is from a
`std::string_view` object.
2023-11-03 15:25:38 +01:00
Benjamin Bannier
f5a76c1aed
Reformat Zeek in Spicy style
...
This largely copies over Spicy's `.clang-format` configuration file. The
one place where we deviate is header include order since Zeek depends on
headers being included in a certain order.
2023-10-30 09:40:55 +01:00
Arne Welzel
9f8eb682b1
zeek-setup: Load scrips before running unit tests
...
It is currently not possible to call a->Conn()->GetVal() or construct a
zeek/file_analysis/File object from within doctests, as these quickly
reference the unpopulated zeek::id namespace to construct Val objects
of various types, making it hard write basic tests without completely
re-organizing.
Move running of the unit tests after parsing the scripts, so it is possible
for some basic exercising of File objects within tests.
2023-03-27 15:16:47 +02:00
Tim Wojtulewicz
35ee96c4cb
A bunch of other minor issues reported by PVS-Studio
2023-01-27 13:03:52 -07:00
Tim Wojtulewicz
5bfd84a903
Fix/simplify some if statement comparisons
2023-01-27 13:03:19 -07:00
Tim Wojtulewicz
797b7657f5
Fix sprintf warnings on macOS
...
The most recent compiler update for macOS marked sprintf as
deprecated, so we started getting warnings from all of the places
that use it.
2023-01-03 12:14:41 -07:00
Josh Soref
cd201aa24e
Spelling src
...
These are non-functional changes.
* accounting
* activation
* actual
* added
* addresult
* aggregable
* aligned
* alternatively
* ambiguous
* analysis
* analyzer
* anticlimactic
* apparently
* application
* appropriate
* arithmetic
* assignment
* assigns
* associated
* authentication
* authoritative
* barrier
* boundary
* broccoli
* buffering
* caching
* called
* canonicalized
* capturing
* certificates
* ciphersuite
* columns
* communication
* comparison
* comparisons
* compilation
* component
* concatenating
* concatenation
* connection
* convenience
* correctly
* corresponding
* could
* counting
* data
* declared
* decryption
* defining
* dependent
* deprecated
* detached
* dictionary
* directional
* directly
* directory
* discarding
* disconnecting
* distinguishes
* documentation
* elsewhere
* emitted
* empty
* endianness
* endpoint
* enumerator
* essentially
* evaluated
* everything
* exactly
* execute
* explicit
* expressions
* facilitates
* fiddling
* filesystem
* flag
* flagged
* for
* fragments
* guarantee
* guaranteed
* happen
* happening
* hemisphere
* identifier
* identifies
* identify
* implementation
* implemented
* implementing
* including
* inconsistency
* indeterminate
* indices
* individual
* information
* initial
* initialization
* initialize
* initialized
* initializes
* instantiate
* instantiated
* instantiates
* interface
* internal
* interpreted
* interpreter
* into
* it
* iterators
* length
* likely
* log
* longer
* mainly
* mark
* maximum
* message
* minimum
* module
* must
* name
* namespace
* necessary
* nonexistent
* not
* notifications
* notifier
* number
* objects
* occurred
* operations
* original
* otherwise
* output
* overridden
* override
* overriding
* overwriting
* ownership
* parameters
* particular
* payload
* persistent
* potential
* precision
* preexisting
* preservation
* preserved
* primarily
* probably
* procedure
* proceed
* process
* processed
* processes
* processing
* propagate
* propagated
* prototype
* provides
* publishing
* purposes
* queue
* reached
* reason
* reassem
* reassemble
* reassembler
* recommend
* record
* reduction
* reference
* regularly
* representation
* request
* reserved
* retrieve
* returning
* separate
* should
* shouldn't
* significant
* signing
* simplified
* simultaneously
* single
* somebody
* sources
* specific
* specification
* specified
* specifies
* specify
* statement
* subdirectories
* succeeded
* successful
* successfully
* supplied
* synchronization
* tag
* temporarily
* terminating
* that
* the
* transmitted
* true
* truncated
* try
* understand
* unescaped
* unforwarding
* unknown
* unknowndata
* unspecified
* update
* usually
* which
* wildcard
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-11-09 12:08:15 -05:00
Tim Wojtulewicz
4d4c6280e9
Miscellaneous deprecations and renaming
2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
70e63d4749
Remove deprecated MemoryAllocation() methods and related code
2022-06-30 18:56:52 +00:00
Tim Wojtulewicz
7c4fd382d9
Code modernization: Convert from deprecated C standard library headers
2022-06-27 09:47:31 -07:00
Tim Wojtulewicz
1f8d406658
Only set connection history if strings differ
2022-05-09 14:35:56 -07:00
Tim Wojtulewicz
4f470c24ed
String/StringVal: Replace char*/string constructors with string_view
2022-02-04 13:52:04 -07:00
Tim Wojtulewicz
9cb54f5d44
clang-format: Force zeek-config.h to be earlier in the config ordering
2021-09-25 11:52:55 -07:00
Tim Wojtulewicz
b2f171ec69
Reformat the world
2021-09-16 15:35:39 -07:00
Tim Wojtulewicz
13f80ed5dd
Add unit tests to ZeekString.cc
2021-05-11 09:26:16 -07:00
Vern Paxson
0118b6ee38
migrate to differentiated vector "At" accessors to support future efficiency
2021-02-25 13:28:23 -08:00
Vern Paxson
e64805430b
fix off-by-one assumption regarding vector indexing dating to 2011
2021-02-24 16:31:07 -08:00
Jon Siwek
8a8a983c49
Add missing zeek/ to header includes
...
Related to https://github.com/zeek/zeek/pull/1377
2021-01-29 19:16:29 -08:00
Tim Wojtulewicz
96d9115360
GH-1079: Use full paths starting with zeek/ when including files
2020-11-12 12:15:26 -07:00
Jon Siwek
72b3a4244e
Avoid passing null pointers to memcmp in ZeekString comparison methods
2020-10-16 10:28:11 -07:00
Tim Wojtulewicz
b1e517e863
Prevent String::Set from crashing if passed a nullptr
2020-10-15 12:49:08 -07:00
Tim Wojtulewicz
fe0c22c789
Base: Clean up explicit uses of namespaces in places where they're not necessary.
...
This commit covers all of the common and base classes.
2020-08-24 12:07:00 -07:00
Tim Wojtulewicz
8d2d867a65
Move everything in util.h to zeek::util namespace.
...
This commit includes renaming a number of methods prefixed with bro_ to be prefixed with zeek_.
2020-08-20 16:00:33 -07:00
Tim Wojtulewicz
886fc102b8
Move DebugLogger to zeek namespaces
2020-07-31 16:23:34 -04:00
Tim Wojtulewicz
1248411a2f
Use properly-sized loop variables or convert to ranged-for (bugprone-too-small-loop-variable)
2020-07-28 12:36:40 -07:00
Tim Wojtulewicz
45d2c96643
Rename BroString files to ZeekString
2020-07-02 17:24:22 -07:00