Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aevol-eukaryotes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LUISELLI Juliette
aevol-eukaryotes
Commits
0994b3a3
Commit
0994b3a3
authored
1 year ago
by
David Parsons
Browse files
Options
Downloads
Patches
Plain Diff
fix memory issue when aevol_create is called providing a sequence file
introduced by
ad7fef6b
parent
54d0cfd2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/aevol_create.cpp
+4
-4
4 additions, 4 deletions
src/aevol_create.cpp
with
4 additions
and
4 deletions
src/aevol_create.cpp
+
4
−
4
View file @
0994b3a3
...
...
@@ -91,10 +91,10 @@ int main(int argc, char* argv[]) {
exit
(
EXIT_FAILURE
);
}
lchromosome
=
strlen
(
raw_chromosome
)
-
1
;
chromosome
=
new
char
[
lchromosome
];
// Warning: will become the DNA of the
// first individual created -> do not
// delete, will be freed in Dna
strncpy
(
chromosome
,
raw_chromosome
,
lchromosome
);
chromosome
=
new
char
[
lchromosome
+
1
];
// Warning: will become the DNA of the
// first individual created -> do not
// delete, will be freed in Dna
strncpy
(
chromosome
,
raw_chromosome
,
lchromosome
+
1
);
printf
(
"Loading chromosome from text file %s (%"
PRId32
" base pairs)
\n
"
,
chromosome_file_name
,
lchromosome
);
fclose
(
chromosome_file
);
...
...
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