Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
3afc2c52
Commit
3afc2c52
authored
7 years ago
by
Jenkins2
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "core: Fix handling of maximum length lines in config files."
parents
debe4fe7
a7927471
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configs/samples/voicemail.conf.sample
+3
-2
3 additions, 2 deletions
configs/samples/voicemail.conf.sample
main/config.c
+2
-2
2 additions, 2 deletions
main/config.c
with
5 additions
and
4 deletions
configs/samples/voicemail.conf.sample
+
3
−
2
View file @
3afc2c52
...
...
@@ -145,8 +145,9 @@ maxlogins=3
; You can select between two variables by using dialplan functions, e.g.
; ${IF(${ISNULL(${ORIG_VM_DATE})}?${VM_DATE}:${ORIG_VM_DATE})}
;
; Note: The emailbody config row can only be up to 512 characters due to a
; limitation in the Asterisk configuration subsystem.
; Note: The emailbody config row can only be up to 8190 characters due to a
; limitation in the Asterisk configuration subsystem. If compiled with
; LOW_MEMORY the limit is 510 characters.
;emailsubject=[PBX]: New message ${VM_MSGNUM} in mailbox ${VM_MAILBOX}
; The following definition is very close to the default, but the default shows
; just the CIDNAME, if it is not null, otherwise just the CIDNUM, or "an unknown
...
...
This diff is collapsed.
Click to expand it.
main/config.c
+
2
−
2
View file @
3afc2c52
...
...
@@ -2195,10 +2195,10 @@ static struct ast_config *config_text_file_load(const char *database, const char
lineno
++
;
if
(
fgets
(
buf
,
sizeof
(
buf
),
f
))
{
/* Skip lines that are too long */
if
(
strlen
(
buf
)
==
sizeof
(
buf
)
-
1
&&
buf
[
sizeof
(
buf
)
-
1
]
!=
'\n'
)
{
if
(
strlen
(
buf
)
==
sizeof
(
buf
)
-
1
&&
buf
[
sizeof
(
buf
)
-
2
]
!=
'\n'
)
{
ast_log
(
LOG_WARNING
,
"Line %d too long, skipping. It begins with: %.32s...
\n
"
,
lineno
,
buf
);
while
(
fgets
(
buf
,
sizeof
(
buf
),
f
))
{
if
(
strlen
(
buf
)
!=
sizeof
(
buf
)
-
1
||
buf
[
sizeof
(
buf
)
-
1
]
==
'\n'
)
{
if
(
strlen
(
buf
)
!=
sizeof
(
buf
)
-
1
||
buf
[
sizeof
(
buf
)
-
2
]
==
'\n'
)
{
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment