]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
app-layer: spelling
authorVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 06:51:41 +0000 (08:51 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 12:50:43 +0000 (14:50 +0200)
14 files changed:
src/app-layer-detect-proto.c
src/app-layer-detect-proto.h
src/app-layer-dnp3-objects.c
src/app-layer-dnp3.c
src/app-layer-enip-common.c
src/app-layer-expectation.c
src/app-layer-ftp.c
src/app-layer-htp-range.c
src/app-layer-htp.c
src/app-layer-parser.c
src/app-layer-protos.h
src/app-layer-smtp.c
src/app-layer-ssl.c
src/app-layer.c

index 7c5ed84f8892540384a4814318aae939f770f5a8..39e36bd31742066b30ef84f97e3c55d5bb60b4d9 100644 (file)
@@ -1836,7 +1836,7 @@ bool AppLayerRequestProtocolChange(Flow *f, uint16_t dp, AppProto expect_proto)
 {
     if (FlowChangeProto(f)) {
         // If we are already changing protocols, from SMTP to TLS for instance,
-        // and that we do not get TLS but HTTP1, which is requesting whange to HTTP2,
+        // and that we do not get TLS but HTTP1, which is requesting change to HTTP2,
         // we do not proceed the new protocol change
         return false;
     }
index e97b35cc4e82d4041446ac6d766dcc01fccd0ab4..4ee4bac10ad840e704291880f20cb7984edee792 100644 (file)
@@ -108,7 +108,7 @@ int AppLayerProtoDetectPMRegisterPatternCI(uint8_t ipproto, AppProto alproto,
  * \brief The first function to be called.  This initializes a global
  *        protocol detection context.
  *
- * \retval 0 On succcess;
+ * \retval 0 On success;
  * \retval -1 On failure.
  */
 int AppLayerProtoDetectSetup(void);
index 9c3d9a53c98cbf8c25e8a0743f14e115116e5576..0bf9cd37bda2296d6bb3fa1a423c59c8df8757eb 100644 (file)
@@ -351,7 +351,7 @@ static int DNP3ReadPrefix(
 /**
  * \brief Add an object to a DNP3PointList.
  *
- * \retval 1 if successfull, 0 on failure.
+ * \retval 1 if successful, 0 on failure.
  */
 static int DNP3AddPoint(DNP3PointList *list, void *object, uint32_t point_index,
     uint8_t prefix_code, uint32_t prefix)
index 3ef50bb8aa9e6222edf5271f3746672880c25b75..21abfaaeb6dac37041094c6a16952981ee8cd03d 100644 (file)
@@ -321,7 +321,7 @@ static uint16_t DNP3ProbingParser(Flow *f, uint8_t direction,
 }
 
 /**
- * \brief Caculate the length of the transport layer with CRCs removed.
+ * \brief Calculate the length of the transport layer with CRCs removed.
  *
  * \param input_len The length of the transport layer buffer.
  *
@@ -663,7 +663,7 @@ static void DNP3ObjectFree(DNP3Object *object)
 }
 
 /**
- * \breif Allocate a DNP3 object.
+ * \brief Allocate a DNP3 object.
  */
 static DNP3Object *DNP3ObjectAlloc(void)
 {
index cb4fb01c72bd218c15881cf9f08cd81759e32cbc..305eb8312b0a7cf41bca7b10bfc98aa4a3b58367 100644 (file)
@@ -565,9 +565,8 @@ int DecodeCIPRequestPDU(const uint8_t *input, uint32_t input_len,
     return ret;
 }
 
-
 /**
- * \brief Deocde CIP Request Path
+ * \brief Decode CIP Request Path
  * @param input, input_len data stream
  * @param enip_data stores data from Packet
  * @param offset current point in the packet
index c7e4f3aa49c2288aacbd0914b5978e90435f5412..7a456f87a336338162ca1a1b6adb3c5bb7ae9688 100644 (file)
@@ -244,7 +244,7 @@ int AppLayerExpectationCreate(Flow *f, int direction, Port src, Port dst,
     exp_list = IPPairGetStorageById(ipp, g_ippair_expectation_id);
     if (exp_list) {
         CIRCLEQ_INSERT_HEAD(&exp_list->list, exp, entries);
-        /* In case there is already EXPECTATION_MAX_LEVEL expectations waiting to be fullfill,
+        /* In case there is already EXPECTATION_MAX_LEVEL expectations waiting to be fulfilled,
          * we remove the older expectation to limit the total number of expectations */
         if (exp_list->length >= EXPECTATION_MAX_LEVEL) {
             Expectation *last_exp = CIRCLEQ_LAST(&exp_list->list);
index a47b0502ed593d9cff1ff0587a8fe512281e0f0e..7f0accadc149417e0e21f1dbb99fa727851afe21 100644 (file)
@@ -1097,7 +1097,7 @@ static AppLayerResult FTPDataParse(Flow *f, FtpDataState *ftpdata_state,
         }
     }
 
-    BUG_ON((direction & ftpdata_state->direction) == 0); // should be unreachble
+    BUG_ON((direction & ftpdata_state->direction) == 0); // should be unreachable
     if (eof) {
         ret = FileCloseFile(ftpdata_state->files, &sbcfg, NULL, 0, flags);
         ftpdata_state->state = FTPDATA_STATE_FINISHED;
index 88c4adba38c9069fc70203bb1d0adfef718d2594..3cdde35ba288fcfb59e7510bca2b9e0c802ad9ee 100644 (file)
@@ -352,7 +352,7 @@ static HttpRangeContainerBlock *HttpRangeOpenFile(HttpRangeContainerFile *c, uin
     HttpRangeContainerBlock *r =
             HttpRangeOpenFileAux(c, start, end, total, sbcfg, name, name_len, flags);
     if (HttpRangeAppendData(sbcfg, r, data, len) < 0) {
-        SCLogDebug("Failed to append data while openeing");
+        SCLogDebug("Failed to append data while opening");
     }
     return r;
 }
@@ -409,7 +409,7 @@ int HttpRangeAppendData(const StreamingBufferConfig *sbcfg, HttpRangeContainerBl
         int r = 0;
         if (c->files) {
             if (data == NULL) {
-                // gap overlaping already known data
+                // gap overlapping already known data
                 r = FileAppendData(c->files, sbcfg, NULL, len - c->toskip);
             } else {
                 r = FileAppendData(c->files, sbcfg, data + c->toskip, len - c->toskip);
@@ -464,7 +464,7 @@ static void HttpRangeFileClose(
 }
 
 /**
- *  \note if `f` is non-NULL, the ownership of the file is transfered to the caller.
+ *  \note if `f` is non-NULL, the ownership of the file is transferred to the caller.
  */
 File *HttpRangeClose(const StreamingBufferConfig *sbcfg, HttpRangeContainerBlock *c, uint16_t flags)
 {
index f750d61d4e3ba79b77d00fad9690d634a68b4642..210283e071add4e6f08691e8f0d04ac355d8ec4c 100644 (file)
@@ -3174,7 +3174,7 @@ static int HTPRegisterPatternsForProtocolDetection(void)
         }
     }
 
-    /* Loop through all the http verions patterns that are TO_CLIENT */
+    /* Loop through all the http version patterns that are TO_CLIENT */
     for (versions_pos = 0; versions[versions_pos]; versions_pos++) {
         register_result = AppLayerProtoDetectPMRegisterPatternCI(IPPROTO_TCP, ALPROTO_HTTP1,
                 versions[versions_pos], (uint16_t)strlen(versions[versions_pos]), 0,
index fc60b98b9a1101549893ac1dfd5cebfd06c83225..7783c076b65b9605eb996286de598e81cd2a771a 100644 (file)
@@ -158,7 +158,7 @@ struct AppLayerParserState_ {
 
 enum ExceptionPolicy g_applayerparser_error_policy = EXCEPTION_POLICY_NOT_SET;
 
-static void AppLayerConfg(void)
+static void AppLayerConfig(void)
 {
     g_applayerparser_error_policy = ExceptionPolicyParse("app-layer.error-policy", true);
 }
@@ -1740,7 +1740,7 @@ void AppLayerParserRegisterProtocolParsers(void)
 {
     SCEnter();
 
-    AppLayerConfg();
+    AppLayerConfig();
 
     RegisterHTPParsers();
     RegisterSSLParsers();
@@ -1861,7 +1861,7 @@ typedef struct TestState_ {
 
 /**
  *  \brief  Test parser function to test the memory deallocation of app layer
- *          parser of occurence of an error.
+ *          parser of occurrence of an error.
  */
 static AppLayerResult TestProtocolParser(Flow *f, void *test_state, AppLayerParserState *pstate,
         StreamSlice stream_slice, void *local_data)
@@ -1933,7 +1933,7 @@ void AppLayerParserRestoreParserTable(void)
 }
 
 /**
- * \test Test the deallocation of app layer parser memory on occurance of
+ * \test Test the deallocation of app layer parser memory on occurrence of
  *       error in the parsing process.
  */
 static int AppLayerParserTest01(void)
@@ -1978,7 +1978,7 @@ static int AppLayerParserTest01(void)
 }
 
 /**
- * \test Test the deallocation of app layer parser memory on occurance of
+ * \test Test the deallocation of app layer parser memory on occurrence of
  *       error in the parsing process for UDP.
  */
 static int AppLayerParserTest02(void)
index b0a5db1c8a0144b08cf6d22aa6891a5a82a8cae6..dd372550cbf58573d98dc1c3e9e6b38b671279ae 100644 (file)
@@ -84,7 +84,7 @@ static inline bool AppProtoIsValid(AppProto a)
     return ((a > ALPROTO_UNKNOWN && a < ALPROTO_FAILED));
 }
 
-// wether a signature AppProto matches a flow (or signature) AppProto
+// whether a signature AppProto matches a flow (or signature) AppProto
 static inline bool AppProtoEquals(AppProto sigproto, AppProto alproto)
 {
     switch (sigproto) {
index d48c23bf11f0a3bc877cef65b7acb04ab775ead9..bdd61d3464d4dd0d940e084b96afd59b1ad9da96 100644 (file)
@@ -952,7 +952,7 @@ static int SMTPProcessReply(SMTPState *state, Flow *f, AppLayerParserState *psta
         /* reply but not a command we have stored, fall through */
     } else if (IsReplyToCommand(state, SMTP_COMMAND_STARTTLS)) {
         if (reply_code == SMTP_REPLY_220) {
-            /* we are entering STARRTTLS data mode */
+            /* we are entering STARTTLS data mode */
             state->parser_state |= SMTP_PARSER_STATE_COMMAND_DATA_MODE;
             if (!AppLayerRequestProtocolTLSUpgrade(f)) {
                 SMTPSetEvent(state, SMTP_DECODER_EVENT_FAILED_PROTOCOL_CHANGE);
index 59856e44fdcbd3f12308fbc08ce8562c0d9b6637..d754d9392454047449650277feb93a04cfdfec16 100644 (file)
@@ -2374,7 +2374,7 @@ static struct SSLDecoderResult SSLv3Decode(uint8_t direction, SSLState *ssl_stat
                     ((ssl_state->flags & SSL_AL_FLAG_STATE_SERVER_HELLO) == 0))
                 break;
 
-            /* if we see (encrypted) aplication data, then this means the
+            /* if we see (encrypted) application data, then this means the
                handshake must be done */
             ssl_state->flags |= SSL_AL_FLAG_HANDSHAKE_DONE;
 
@@ -2400,7 +2400,7 @@ static struct SSLDecoderResult SSLv3Decode(uint8_t direction, SSLState *ssl_stat
         case SSLV3_HANDSHAKE_PROTOCOL: {
             if (ssl_state->flags & SSL_AL_FLAG_CHANGE_CIPHER_SPEC) {
                 /* In TLSv1.3, ChangeCipherSpec is only used for middlebox
-                   compability (rfc8446, appendix D.4). */
+                   compatibility (rfc8446, appendix D.4). */
                 // Client hello flags is needed to have a valid version
                 if ((ssl_state->flags & SSL_AL_FLAG_STATE_CLIENT_HELLO) &&
                         (ssl_state->client_connp.version > TLS_VERSION_12) &&
@@ -2474,7 +2474,7 @@ static struct SSLDecoderResult SSLv3Decode(uint8_t direction, SSLState *ssl_stat
  * \brief SSLv2, SSLv23, SSLv3, TLSv1.1, TLSv1.2, TLSv1.3 parser.
  *
  *        On parsing error, this should be the only function that should reset
- *        the parser state, to avoid multiple functions in the chain reseting
+ *        the parser state, to avoid multiple functions in the chain resetting
  *        the parser state.
  *
  * \param direction 0 for toserver, 1 for toclient.
@@ -2556,8 +2556,8 @@ static AppLayerResult SSLDecode(Flow *f, uint8_t direction, void *alstate,
                     SSLv2Decode(direction, ssl_state, pstate, input, input_len, stream_slice);
             if (r.retval < 0 || r.retval > input_len) {
                 DEBUG_VALIDATE_BUG_ON(r.retval > input_len);
-                SCLogDebug("Error parsing SSLv2. Reseting parser "
-                        "state. Let's get outta here");
+                SCLogDebug("Error parsing SSLv2. Resetting parser "
+                           "state. Let's get outta here");
                 SSLParserReset(ssl_state);
                 SSLSetEvent(ssl_state,
                         TLS_DECODER_EVENT_INVALID_SSL_RECORD);
@@ -2583,8 +2583,8 @@ static AppLayerResult SSLDecode(Flow *f, uint8_t direction, void *alstate,
                     SSLv3Decode(direction, ssl_state, pstate, input, input_len, stream_slice);
             if (r.retval < 0 || r.retval > input_len) {
                 DEBUG_VALIDATE_BUG_ON(r.retval > input_len);
-                SCLogDebug("Error parsing TLS. Reseting parser "
-                        "state.  Let's get outta here");
+                SCLogDebug("Error parsing TLS. Resetting parser "
+                           "state.  Let's get outta here");
                 SSLParserReset(ssl_state);
                 return APP_LAYER_ERROR;
             } else if (r.needed) {
index 0e244caf2039a795a88e944c17d47a4a0bc3aa06..6d4ac2ea8f795fa5aa5874b3c2538af6807eb9a4 100644 (file)
@@ -464,7 +464,7 @@ static int TCPProtoDetect(ThreadVars *tv,
          *
          * \todo We need to figure out a more robust solution for this,
          *       as this can lead to easy evasion tactics, where the
-         *       attackeer can first send some dummy data in the wrong
+         *       attacker can first send some dummy data in the wrong
          *       direction first to mislead our proto detection process.
          *       While doing this we need to update the parsers as well,
          *       since the parsers must be robust to see such wrong